Class AuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<org.springframework.security.oauth2.jwt.Jwt>
org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken
com.sap.cloud.security.xsuaa.token.AuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class AuthenticationToken extends org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken
Internal class used to expose the Token implementation as the standard Principal for Spring Security Jwt handling.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthenticationToken(org.springframework.security.oauth2.jwt.Jwt jwt, Collection<org.springframework.security.core.GrantedAuthority> authorities)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     

    Methods inherited from class org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken

    getTokenAttributes

    Methods inherited from class org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken

    getCredentials, getToken

    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 Details

    • AuthenticationToken

      public AuthenticationToken(org.springframework.security.oauth2.jwt.Jwt jwt, Collection<org.springframework.security.core.GrantedAuthority> authorities)
  • Method Details

    • getPrincipal

      public Object getPrincipal()
      Specified by:
      getPrincipal in interface org.springframework.security.core.Authentication
      Overrides:
      getPrincipal in class org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<org.springframework.security.oauth2.jwt.Jwt>
    • getName

      public String getName()
      Specified by:
      getName in interface Principal
      Overrides:
      getName in class org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationToken