java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<org.springframework.security.oauth2.core.OAuth2AccessToken>
org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

@Transient public class BearerTokenAuthentication extends AbstractOAuth2TokenAuthenticationToken<org.springframework.security.oauth2.core.OAuth2AccessToken>
An Authentication token that represents a successful authentication as obtained through a bearer token.
Since:
5.2
See Also:
  • Constructor Details

    • BearerTokenAuthentication

      public BearerTokenAuthentication(org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal principal, org.springframework.security.oauth2.core.OAuth2AccessToken credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Constructs a BearerTokenAuthentication with the provided arguments
      Parameters:
      principal - The OAuth 2.0 attributes
      credentials - The verified token
      authorities - The authorities associated with the given token
  • Method Details