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.
  • Constructor Details

    • UserSeedSecurityListener

      public UserSeedSecurityListener()
  • Method Details

    • 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 after SecurityListener.authenticated2(org.springframework.security.core.userdetails.UserDetails). It should be called after the SecurityContextHolder.getContext()'s authentication is set.
      Overrides:
      loggedIn in class SecurityListener
      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 class SecurityListener
      Parameters:
      details - details of the newly authenticated user, such as name and groups.