org.springframework.security.oauth2.provider
类 OAuth2Authentication

java.lang.Object
  继承者 org.springframework.security.authentication.AbstractAuthenticationToken
      继承者 org.springframework.security.oauth2.provider.OAuth2Authentication
所有已实现的接口:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class OAuth2Authentication
extends org.springframework.security.authentication.AbstractAuthenticationToken

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.

作者:
Ryan Heaton
另请参见:
序列化表格

构造方法摘要
OAuth2Authentication(OAuth2Request clientAuthentication, org.springframework.security.core.Authentication userAuthentication)
          Construct an OAuth 2 authentication.
 
方法摘要
 boolean equals(Object o)
           
 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.
 
从类 org.springframework.security.authentication.AbstractAuthenticationToken 继承的方法
eraseCredentials, getAuthorities, getDetails, getName, setAuthenticated, setDetails, toString
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

OAuth2Authentication

public OAuth2Authentication(OAuth2Request clientAuthentication,
                            org.springframework.security.core.Authentication userAuthentication)
Construct an OAuth 2 authentication. Since some grant types don't require user authentication, the user authentication may be null.

参数:
authorizationRequest - The authorization request (must not be null).
userAuthentication - The user authentication (possibly null).
方法详细信息

getCredentials

public Object getCredentials()

getPrincipal

public Object getPrincipal()

isClientOnly

public boolean isClientOnly()
Convenience method to check if there is a user associated with this token, or just a client application.

返回:
true if this token represents a client app not acting on behalf of a user

getOAuth2Request

public OAuth2Request getOAuth2Request()
The authorization request containing details of the client application.

返回:
The client authentication.

getUserAuthentication

public org.springframework.security.core.Authentication getUserAuthentication()
The user authentication.

返回:
The user authentication.

isAuthenticated

public boolean isAuthenticated()
指定者:
接口 org.springframework.security.core.Authentication 中的 isAuthenticated
覆盖:
org.springframework.security.authentication.AbstractAuthenticationToken 中的 isAuthenticated

equals

public boolean equals(Object o)
指定者:
接口 Principal 中的 equals
覆盖:
org.springframework.security.authentication.AbstractAuthenticationToken 中的 equals

hashCode

public int hashCode()
指定者:
接口 Principal 中的 hashCode
覆盖:
org.springframework.security.authentication.AbstractAuthenticationToken 中的 hashCode


Copyright © 2013. All rights reserved.