I need to know how to use JIRA API to implement:
1. check whether a user exists in JIRA (by email or by username);
2. create JIRA user account;
3. log them into JIRA(record session information).
My jira instance version is 4.4.3
do you want to do it on a server side (as JIRA plugin) or remotely (e.g. from a script)?
WRT 3. What do you mean here? Would you like to fully transparently log in users (to their just created accounts) when they are accessing JIRA from web browser? If yes, then how you know who accesses your JIRA instance first? Do you use some other authentication mechanism (like NTLM), etc.?
Hi Seliga,
I want to do these in server side. There is a SSO application in my company, I am researching the JIRA integration with it. I added a front filter on jira to check whether user session exists, if not filter will redirect user to this SSO to login. After user login, the SSO will redirect request back to JIRA with user information. I have a servlet to handle this.
I could get the user information in the servlet, now I want to programmatically to the following things:
1. check whether user exist(by username or by email)
2. create JIRA user account
3. transparently log in users to JIRA
I saw some source code of NTLM and CAS integration with JIRA, but the API they used is obsolete.
Please help tell me how to do these things in server side using 4.4 API or give some advice.
Thanks in advance.
Regards,
Yaoyu
Wouldn't you have to user JIRA's API for this?
Hi,
I am not sure but for 1. & 2. you can use jelly scripts.
below is a jelly script to reset user password.
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:log="jelly:log" xmlns:util="jelly:util" > <jira:Login username="admin" password="admin"> <!-- Grab an instance of UserManager --> <core:invokeStatic className="com.opensymphony.user.UserManager" method="getInstance" var="userManager"/> <!-- Get the User from UserManager --> <core:invoke on="${userManager}" method="getUser" var="user"> <core:arg type="java.lang.String" value="user_name"/> </core:invoke> <core:invoke on="${user}" method="setPassword"> <core:arg type="java.lang.String" value="new_password"/> </core:invoke> </jira:Login> </JiraJelly>
Hi Mizan,
Thanks for your information.
I can implement integration with my company SSO.
It looks like you're new here. Sign in or register to get started.