Class JwtAuthenticationToken

    • Constructor Detail

      • JwtAuthenticationToken

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

        public JwtAuthenticationToken​(Jwt jwt,
                                      java.util.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,
                                      java.util.Collection<? extends 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 AbstractAuthenticationToken