The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

[SccriptRunner] - Custom listener in login - Userfailedauthentication envent

cyril
August 8, 2016

Hi, I want to use the Custom listener on the UserAuthenticationfailedInvalidAuthenticationUser event. But I did not find any documentation on this event.

I would like to get some information on the login such as the username used to try to login

What method can I use with UserAuthenticationfailedInvalidAuthenticationUser event Object?

Can you help me?

Thank you

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Thanos Batagiannis _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 9, 2016

Hi Cyril,

There are just a couple of thing you can get from a UserAuthenticationfailedInvalidAuthenticationUser event (Occurs whenever a user fails to authenticate). So for example you can get the username and the timestamp that the event happened

log.debug("User name who failed to login: ${event?.username}")
Date date = new Date(event?.getTimestamp())
log.debug ("Date and time event took place : ${date}")

hope that helps,

Thanos

cyril
August 9, 2016

Thank you for your answer. It is enough for my need, but for my curiosity where can i find all the attribute and method of the object UserAuthenticationfailedInvalidAuthenticationUser

In the link you sent to me, I did not find anything about "username" or "getTimestamps"

 

Thank you

cyril
August 10, 2016

There is a bug in the inline script of script runner.

when I  I use "event?.username", scriptrunner tells me :

No such property : username in the class com.atlassian.jira.event.issue.issueEvent

 But it works anyway.

The web interface shows the event object as com.atlassian.jira.event.issue.issueEvent object

and the logs shows the event object as com.atlassian.crowd.event.user.UserAuthenticationFailedInvalidAuthenticationEvent object

So if someone get his code underline, they should not consider the web interface error and execute the code to check in the logs