org.springframework.security.oauth2.provider
类 TokenRequest

java.lang.Object
  继承者 org.springframework.security.oauth2.provider.TokenRequest

public class TokenRequest
extends Object

Represents an OAuth2 token request, made at the TokenEndpoint. The requestParameters map should contain the original, unmodified parameters from the original OAuth2 request. In the implicit flow, a token is requested through the AuthorizationEndpoint directly, and in that case the AuthorizationRequest is converted into a TokenRequest for processing through the token granting chain.

作者:
Amanda Anganes

字段摘要
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 TokenRequest()
          Default constructor
  TokenRequest(Map<String,String> requestParameters, String clientId, Collection<String> scope, String grantType)
          Full constructor.
 
方法摘要
 OAuth2Request createOAuth2Request(ClientDetails client)
           
 boolean equals(Object obj)
           
 String getClientId()
           
 String getGrantType()
           
 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> getScope()
           
 int hashCode()
           
 void setClientId(String clientId)
           
 void setGrantType(String grantType)
           
 void setRequestParameters(Map<String,String> requestParameters)
           
 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.

构造方法详细信息

TokenRequest

protected TokenRequest()
Default constructor


TokenRequest

public TokenRequest(Map<String,String> requestParameters,
                    String clientId,
                    Collection<String> scope,
                    String grantType)
Full constructor. Sets this TokenRequest's requestParameters map to an unmodifiable version of the one provided.

参数:
requestParameters -
clientId -
scope -
grantType -
方法详细信息

getGrantType

public String getGrantType()

setGrantType

public void setGrantType(String grantType)

setClientId

public void setClientId(String clientId)

setScope

public void setScope(Collection<String> scope)

setRequestParameters

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

createOAuth2Request

public OAuth2Request createOAuth2Request(ClientDetails client)

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

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode

equals

public boolean equals(Object obj)
覆盖:
Object 中的 equals


Copyright © 2013. All rights reserved.