Package jenkins.security
Class LastGrantedAuthoritiesProperty.SecurityListenerImpl
- java.lang.Object
-
- jenkins.security.SecurityListener
-
- jenkins.security.LastGrantedAuthoritiesProperty.SecurityListenerImpl
-
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- LastGrantedAuthoritiesProperty
@Extension public static class LastGrantedAuthoritiesProperty.SecurityListenerImpl extends SecurityListener
Listen to the login success/failure event to persistGrantedAuthoritys properly.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description SecurityListenerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfailedToLogIn(String username)Fired when a user has failed to log in.protected voidloggedIn(String username)Fired when a user has logged in.-
Methods inherited from class jenkins.security.SecurityListener
authenticated, authenticated2, failedToAuthenticate, fireAuthenticated, fireAuthenticated2, fireFailedToAuthenticate, fireFailedToLogIn, fireLoggedIn, fireLoggedOut, fireUserCreated, loggedOut, userCreated
-
-
-
-
Method Detail
-
loggedIn
protected void loggedIn(@NonNull String username)Description copied from class:SecurityListenerFired when a user has logged in. Compared to authenticated, there is a notion of storage / cache. Would be called afterSecurityListener.authenticated2(org.springframework.security.core.userdetails.UserDetails). It should be called after theSecurityContextHolder.getContext()'s authentication is set.- Overrides:
loggedInin classSecurityListener- Parameters:
username- the user
-
failedToLogIn
protected void failedToLogIn(@NonNull String username)Description copied from class:SecurityListenerFired when a user has failed to log in. Would be called afterSecurityListener.failedToAuthenticate(java.lang.String).- Overrides:
failedToLogInin classSecurityListener- Parameters:
username- the user
-
-