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 by
HttpSessionContextIntegrationFilter2
and UserSeedProperty
.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
authenticated2
(org.springframework.security.core.userdetails.UserDetails details) Fired when a user was successfully authenticated using credentials.protected void
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
-
Constructor Details
-
UserSeedSecurityListener
public UserSeedSecurityListener()
-
-
Method Details
-
loggedIn
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.
-