public class OAuth2Authentication
extends org.springframework.security.authentication.AbstractAuthenticationToken
Constructor and Description |
---|
OAuth2Authentication(OAuth2Request storedRequest,
org.springframework.security.core.Authentication userAuthentication)
Construct an OAuth 2 authentication.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
void |
eraseCredentials() |
Object |
getCredentials() |
OAuth2Request |
getOAuth2Request()
The authorization request containing details of the client application.
|
Object |
getPrincipal() |
org.springframework.security.core.Authentication |
getUserAuthentication()
The user authentication.
|
int |
hashCode() |
boolean |
isAuthenticated() |
boolean |
isClientOnly()
Convenience method to check if there is a user associated with this token, or just a client application.
|
public OAuth2Authentication(OAuth2Request storedRequest, org.springframework.security.core.Authentication userAuthentication)
storedRequest
- The authorization request (must not be null).userAuthentication
- The user authentication (possibly null).public Object getCredentials()
public Object getPrincipal()
public boolean isClientOnly()
public OAuth2Request getOAuth2Request()
public org.springframework.security.core.Authentication getUserAuthentication()
public boolean isAuthenticated()
isAuthenticated
in interface org.springframework.security.core.Authentication
isAuthenticated
in class org.springframework.security.authentication.AbstractAuthenticationToken
public void eraseCredentials()
eraseCredentials
in interface org.springframework.security.core.CredentialsContainer
eraseCredentials
in class org.springframework.security.authentication.AbstractAuthenticationToken
public boolean equals(Object o)
Copyright © 2019. All rights reserved.