Class BearerTokenOAuth2Authentication

  • All Implemented Interfaces:
    Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

    public class BearerTokenOAuth2Authentication
    extends org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication
    Implementation of OAuth2AuthenticatedPrincipal which delegates to DefaultOAuth2AuthenticatedPrincipal and also includes the BirchProperties.IdPRealm configuration.
    Author:
    Keivan Khalichi
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BearerTokenOAuth2Authentication​(org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal thePrincipal, org.springframework.security.oauth2.core.OAuth2AccessToken theCredentials, Collection<? extends org.springframework.security.core.GrantedAuthority> theAuthorities, org.birchframework.configuration.BirchProperties.IdPRealm theIdPRealm)
      Constructs a BearerTokenAuthentication with the provided arguments
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getIdPRealmKey()  
      String getIdPRealmName()  
      • Methods inherited from class org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication

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

        getCredentials, getPrincipal, getToken
      • Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

        equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
    • Constructor Detail

      • BearerTokenOAuth2Authentication

        public BearerTokenOAuth2Authentication​(org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal thePrincipal,
                                               org.springframework.security.oauth2.core.OAuth2AccessToken theCredentials,
                                               Collection<? extends org.springframework.security.core.GrantedAuthority> theAuthorities,
                                               org.birchframework.configuration.BirchProperties.IdPRealm theIdPRealm)
        Constructs a BearerTokenAuthentication with the provided arguments
        Parameters:
        thePrincipal - The OAuth 2.0 attributes
        theCredentials - The verified token
        theAuthorities - The theAuthorities associated with the given token
        theIdPRealm - the IdP realm properties
    • Method Detail

      • getIdPRealmKey

        public String getIdPRealmKey()
      • getIdPRealmName

        public String getIdPRealmName()