Class OAuthentication<T extends Map<String,Object> & Serializable & Principal & org.springframework.security.oauth2.core.OAuth2Token>
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<T>
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 & org.springframework.security.oauth2.core.OAuth2Token>
extends org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<T>
implements org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
- Author:
- ch4mp
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOAuthentication(T token, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) -
Method Summary
Modifier and TypeMethodDescriptiongetName()voidsetAuthenticated(boolean isAuthenticated) voidsetDetails(Object details) Methods inherited from class org.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken
getTokenMethods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, hashCode, isAuthenticated, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
getAttribute, getAuthorities
-
Constructor Details
-
OAuthentication
public OAuthentication(T token, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) - Parameters:
token- OAuth2Token of any-type (aOpenidTokenor any sub-type is probably convenient)authorities- Granted authorities associated with this authentication instance
-
-
Method Details
-
getTokenAttributes
-
setDetails
- Overrides:
setDetailsin classorg.springframework.security.authentication.AbstractAuthenticationToken
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated) - Specified by:
setAuthenticatedin interfaceorg.springframework.security.core.Authentication- Overrides:
setAuthenticatedin classorg.springframework.security.authentication.AbstractAuthenticationToken
-
getCredentials
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication- Overrides:
getCredentialsin classorg.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<T extends Map<String,Object> & Serializable & Principal & org.springframework.security.oauth2.core.OAuth2Token>
-
getName
-
getPrincipal
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication- Overrides:
getPrincipalin classorg.springframework.security.oauth2.server.resource.authentication.AbstractOAuth2TokenAuthenticationToken<T extends Map<String,Object> & Serializable & Principal & org.springframework.security.oauth2.core.OAuth2Token>
-
getAttributes
- Specified by:
getAttributesin interfaceorg.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
-
getClaims
-
getBearerHeader
-