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 persistGrantedAuthority
s 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 void
failedToLogIn(String username)
Fired when a user has failed to log in.protected void
loggedIn(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:SecurityListener
Fired 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:
loggedIn
in classSecurityListener
- Parameters:
username
- the user
-
failedToLogIn
protected void failedToLogIn(@NonNull String username)
Description copied from class:SecurityListener
Fired when a user has failed to log in. Would be called afterSecurityListener.failedToAuthenticate(java.lang.String)
.- Overrides:
failedToLogIn
in classSecurityListener
- Parameters:
username
- the user
-
-