Package jenkins.security.seed
Class UserSeedSecurityListener
- java.lang.Object
-
- jenkins.security.SecurityListener
-
- jenkins.security.seed.UserSeedSecurityListener
-
- All Implemented Interfaces:
ExtensionPoint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension(ordinal=2.147483647E9) public class UserSeedSecurityListener extends SecurityListener
Inject the user seed inside the session (when there is an existing request) as part of the re-authentication mechanism provided byHttpSessionContextIntegrationFilter2
andUserSeedProperty
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description UserSeedSecurityListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
authenticated2(org.springframework.security.core.userdetails.UserDetails details)
Fired when a user was successfully authenticated using credentials.protected void
loggedIn(String username)
Fired when a user has logged in.-
Methods inherited from class jenkins.security.SecurityListener
authenticated, failedToAuthenticate, failedToLogIn, 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
-
authenticated2
protected void authenticated2(@NonNull org.springframework.security.core.userdetails.UserDetails details)
Description copied from class:SecurityListener
Fired when a user was successfully authenticated using credentials. It could be password or any other credentials. This might be via the web UI, or via REST (using API token or Basic), or CLI (remoting, auth, ssh) or any other way plugins can propose.- Overrides:
authenticated2
in classSecurityListener
- Parameters:
details
- details of the newly authenticated user, such as name and groups.
-
-