Class JmixJwtAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
io.jmix.oidc.jwt.JmixJwtAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class JmixJwtAuthenticationToken extends org.springframework.security.authentication.AbstractAuthenticationToken
An implementation of an AbstractOAuth2TokenAuthenticationToken representing a Jwt Authentication.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected JmixOidcUser
     
    protected org.springframework.security.oauth2.jwt.Jwt
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JmixJwtAuthenticationToken(org.springframework.security.oauth2.jwt.Jwt jwt, JmixOidcUser principal, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
    Constructs a JmixJwtAuthenticationToken using the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    The principal name
     

    Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    equals, eraseCredentials, getAuthorities, getDetails, hashCode, isAuthenticated, setAuthenticated, setDetails, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.security.Principal

    implies
  • Field Details

    • principal

      protected JmixOidcUser principal
    • token

      protected org.springframework.security.oauth2.jwt.Jwt token
  • Constructor Details

    • JmixJwtAuthenticationToken

      public JmixJwtAuthenticationToken(org.springframework.security.oauth2.jwt.Jwt jwt, JmixOidcUser principal, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Constructs a JmixJwtAuthenticationToken using the provided parameters.
      Parameters:
      jwt - the JWT
      principal - the principal being authenticated
      authorities - the authorities assigned to the JWT
  • Method Details

    • getName

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

      public Object getCredentials()
    • getPrincipal

      public Object getPrincipal()