Class OAuthentication<T extends Map<String,Object> & Serializable & Principal>

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
com.c4_soft.springaddons.security.oidc.OAuthentication<T>
Type Parameters:
T - OpenidClaimSet or any specialization. See
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.AuthenticatedPrincipal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer, org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal

public class OAuthentication<T extends Map<String,Object> & Serializable & Principal> extends org.springframework.security.authentication.AbstractAuthenticationToken implements org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
Author:
ch4mp
See Also:
  • Constructor Details

    • OAuthentication

      public OAuthentication(T claims, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, String tokenString)
      Parameters:
      claims - Claim-set of any-type
      authorities - Granted authorities associated with this authentication instance
      tokenString - Original encoded Bearer string (in case resource-server needs
  • Method Details

    • setDetails

      public void setDetails(Object details)
      Overrides:
      setDetails in class org.springframework.security.authentication.AbstractAuthenticationToken
    • setAuthenticated

      public void setAuthenticated(boolean isAuthenticated)
      Specified by:
      setAuthenticated in interface org.springframework.security.core.Authentication
      Overrides:
      setAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationToken
    • getCredentials

      public String getCredentials()
      Specified by:
      getCredentials in interface org.springframework.security.core.Authentication
    • getName

      public String getName()
      Specified by:
      getName in interface org.springframework.security.core.AuthenticatedPrincipal
      Specified by:
      getName in interface Principal
      Overrides:
      getName in class org.springframework.security.authentication.AbstractAuthenticationToken
    • getPrincipal

      public T getPrincipal()
      Specified by:
      getPrincipal in interface org.springframework.security.core.Authentication
    • getAttributes

      public T getAttributes()
      Specified by:
      getAttributes in interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
    • getClaims

      public T getClaims()
    • getBearerHeader

      public String getBearerHeader()