Class JwtAuthenticationToken

All Implemented Interfaces:
Serializable, Principal, Authentication, CredentialsContainer

@Transient public class JwtAuthenticationToken extends AbstractOAuth2TokenAuthenticationToken<Jwt>
An implementation of an AbstractOAuth2TokenAuthenticationToken representing a Jwt Authentication.
Since:
5.1
See Also:
  • Constructor Details

    • JwtAuthenticationToken

      public JwtAuthenticationToken(Jwt jwt)
      Constructs a JwtAuthenticationToken using the provided parameters.
      Parameters:
      jwt - the JWT
    • JwtAuthenticationToken

      public JwtAuthenticationToken(Jwt jwt, Collection<? extends GrantedAuthority> authorities)
      Constructs a JwtAuthenticationToken using the provided parameters.
      Parameters:
      jwt - the JWT
      authorities - the authorities assigned to the JWT
    • JwtAuthenticationToken

      public JwtAuthenticationToken(Jwt jwt, Collection<? extends GrantedAuthority> authorities, String name)
      Constructs a JwtAuthenticationToken using the provided parameters.
      Parameters:
      jwt - the JWT
      authorities - the authorities assigned to the JWT
      name - the principal name
    • JwtAuthenticationToken

      protected JwtAuthenticationToken(JwtAuthenticationToken.Builder<?> builder)
    • JwtAuthenticationToken

      public JwtAuthenticationToken(Jwt jwt, Object principal, Collection<? extends GrantedAuthority> authorities)
      Constructs a JwtAuthenticationToken using the provided parameters.
      Parameters:
      jwt - the JWT
      principal - the principal
      authorities - the authorities assigned to the JWT
      Since:
      7.1
  • Method Details