Class Pac4jAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.pac4j.springframework.security.authentication.Pac4jAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, Pac4jAuthentication, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class Pac4jAuthenticationToken extends org.springframework.security.authentication.AbstractAuthenticationToken implements Pac4jAuthentication
Pac4j authentication token when the user is authenticated.
Since:
2.0.0
Author:
Jerome Leleu
See Also:
  • Constructor Details

    • Pac4jAuthenticationToken

      public Pac4jAuthenticationToken(List<org.pac4j.core.profile.UserProfile> profiles)
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Principal
      Overrides:
      getName in class org.springframework.security.authentication.AbstractAuthenticationToken
    • getCredentials

      public Object getCredentials()
      Specified by:
      getCredentials in interface org.springframework.security.core.Authentication
    • getPrincipal

      public Object getPrincipal()
      Specified by:
      getPrincipal in interface org.springframework.security.core.Authentication
    • getProfiles

      public List<org.pac4j.core.profile.UserProfile> getProfiles()
      Description copied from interface: Pac4jAuthentication
      Get all the profiles of the authenticated user.
      Specified by:
      getProfiles in interface Pac4jAuthentication
      Returns:
      the list of profiles