|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.provider.OAuth2Authentication
public class OAuth2Authentication
An OAuth 2 authentication token can contain two authentications: one for the client and one for the user. Since some OAuth authorization grants don't require user authentication, the user authentication may be null.
Constructor Summary | |
---|---|
OAuth2Authentication(AuthorizationRequest authorizationRequest,
org.springframework.security.core.Authentication userAuthentication)
Construct an OAuth 2 authentication. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
AuthorizationRequest |
getAuthorizationRequest()
The authorization request containing details of the client application. |
Object |
getCredentials()
|
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. |
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken |
---|
eraseCredentials, getAuthorities, getDetails, getName, setAuthenticated, setDetails, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OAuth2Authentication(AuthorizationRequest authorizationRequest, org.springframework.security.core.Authentication userAuthentication)
authorizationRequest
- The authorization request (must not be null).userAuthentication
- The user authentication (possibly null).Method Detail |
---|
public Object getCredentials()
public Object getPrincipal()
public boolean isClientOnly()
public AuthorizationRequest getAuthorizationRequest()
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 boolean equals(Object o)
equals
in interface Principal
equals
in class org.springframework.security.authentication.AbstractAuthenticationToken
public int hashCode()
hashCode
in interface Principal
hashCode
in class org.springframework.security.authentication.AbstractAuthenticationToken
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |