org.springframework.security.oauth2.provider
类 OAuth2Request

java.lang.Object
  继承者 org.springframework.security.oauth2.provider.OAuth2Request
所有已实现的接口:
Serializable

public class OAuth2Request
extends Object
implements Serializable

Represents a stored authorization or token request. Used as part of the OAuth2Authentication object to store a request's authentication information. Does not expose public setters so that clients can not mutate state if they respect the declared type of the request.

作者:
Amanda Anganes, Dave Syer
另请参见:
序列化表格

字段摘要
protected  String clientId
          Resolved client ID.
protected  Map<String,String> requestParameters
          Map of parameters passed in to the Authorization Endpoint or Token Endpoint, preserved unchanged from the original request.
protected  Set<String> scope
          Resolved scope set, initialized (by the OAuth2RequestFactory) with the scopes originally requested.
 
构造方法摘要
protected OAuth2Request()
           
  OAuth2Request(Map<String,String> requestParameters, String clientId, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, boolean approved, Set<String> scope, Set<String> resourceIds, String redirectUri, Set<String> responseTypes, Map<String,Serializable> extensionProperties)
           
protected OAuth2Request(OAuth2Request other)
           
protected OAuth2Request(String clientId)
           
 
方法摘要
 OAuth2Request createOAuth2Request(Map<String,String> parameters)
          Update the request parameters and return a new object with the same properties except the parameters.
 boolean equals(Object obj)
           
 Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
           
 String getClientId()
           
 Map<String,Serializable> getExtensions()
           
 String getRedirectUri()
           
 Map<String,String> getRequestParameters()
          Warning: most clients should use the individual properties of this class, such as {getScope() or { getClientId(), rather than retrieving values from this map.
 Set<String> getResourceIds()
           
 Set<String> getResponseTypes()
           
 Set<String> getScope()
           
 int hashCode()
           
 boolean isApproved()
           
protected  void setClientId(String clientId)
           
protected  void setRequestParameters(Map<String,String> requestParameters)
           
protected  void setScope(Collection<String> scope)
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

clientId

protected String clientId
Resolved client ID. This may be present in the original request parameters, or in some cases may be inferred by a processing class and inserted here.


scope

protected Set<String> scope
Resolved scope set, initialized (by the OAuth2RequestFactory) with the scopes originally requested. Further processing and user interaction may alter the set of scopes that is finally granted and stored when the request processing is complete.


requestParameters

protected Map<String,String> requestParameters
Map of parameters passed in to the Authorization Endpoint or Token Endpoint, preserved unchanged from the original request. This map should not be modified after initialization. In general, classes should not retrieve values from this map directly, and should instead use the individual members on this class. The OAuth2RequestFactory is responsible for initializing all members of this class, usually by parsing the values inside the requestParmaeters map.

构造方法详细信息

OAuth2Request

public OAuth2Request(Map<String,String> requestParameters,
                     String clientId,
                     Collection<? extends org.springframework.security.core.GrantedAuthority> authorities,
                     boolean approved,
                     Set<String> scope,
                     Set<String> resourceIds,
                     String redirectUri,
                     Set<String> responseTypes,
                     Map<String,Serializable> extensionProperties)

OAuth2Request

protected OAuth2Request(OAuth2Request other)

OAuth2Request

protected OAuth2Request(String clientId)

OAuth2Request

protected OAuth2Request()
方法详细信息

getRedirectUri

public String getRedirectUri()

getResponseTypes

public Set<String> getResponseTypes()

getAuthorities

public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()

isApproved

public boolean isApproved()

getResourceIds

public Set<String> getResourceIds()

getExtensions

public Map<String,Serializable> getExtensions()

setClientId

protected void setClientId(String clientId)

setScope

protected void setScope(Collection<String> scope)

setRequestParameters

protected void setRequestParameters(Map<String,String> requestParameters)

createOAuth2Request

public OAuth2Request createOAuth2Request(Map<String,String> parameters)
Update the request parameters and return a new object with the same properties except the parameters.

参数:
parameters - new parameters replacing the existing ones
返回:
a new OAuth2Request

hashCode

public int hashCode()

equals

public boolean equals(Object obj)

getClientId

public String getClientId()

getScope

public Set<String> getScope()

getRequestParameters

public Map<String,String> getRequestParameters()
Warning: most clients should use the individual properties of this class, such as {getScope() or { getClientId(), rather than retrieving values from this map.

返回:
the original, unchanged set of request parameters


Copyright © 2013. All rights reserved.