Class JwtAuthenticationToken

    • Constructor Summary

      Constructors 
      Constructor Description
      JwtAuthenticationToken​(org.springframework.security.oauth2.jwt.Jwt jwt)
      Constructs a JwtAuthenticationToken using the provided parameters.
      JwtAuthenticationToken​(org.springframework.security.oauth2.jwt.Jwt jwt, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Constructs a JwtAuthenticationToken using the provided parameters.
      JwtAuthenticationToken​(org.springframework.security.oauth2.jwt.Jwt jwt, java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, java.lang.String name)
      Constructs a JwtAuthenticationToken using the provided parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      The principal name which is, by default, the Jwt's subject
      java.util.Map<java.lang.String,​java.lang.Object> getTokenAttributes()
      Returns the attributes of the access token.
      • 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
    • Constructor Detail

      • JwtAuthenticationToken

        public JwtAuthenticationToken​(org.springframework.security.oauth2.jwt.Jwt jwt)
        Constructs a JwtAuthenticationToken using the provided parameters.
        Parameters:
        jwt - the JWT
      • JwtAuthenticationToken

        public JwtAuthenticationToken​(org.springframework.security.oauth2.jwt.Jwt jwt,
                                      java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
        Constructs a JwtAuthenticationToken using the provided parameters.
        Parameters:
        jwt - the JWT
        authorities - the authorities assigned to the JWT
      • JwtAuthenticationToken

        public JwtAuthenticationToken​(org.springframework.security.oauth2.jwt.Jwt jwt,
                                      java.util.Collection<? extends org.springframework.security.core.GrantedAuthority> authorities,
                                      java.lang.String name)
        Constructs a JwtAuthenticationToken using the provided parameters.
        Parameters:
        jwt - the JWT
        authorities - the authorities assigned to the JWT
        name - the principal name
    • Method Detail

      • getName

        public java.lang.String getName()
        The principal name which is, by default, the Jwt's subject
        Specified by:
        getName in interface java.security.Principal
        Overrides:
        getName in class org.springframework.security.authentication.AbstractAuthenticationToken