org.springframework.security.oauth2.provider
类 DefaultOAuth2RequestFactory

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

public class DefaultOAuth2RequestFactory
extends Object
implements OAuth2RequestFactory

Default implementation of OAuth2RequestFactory which initializes fields from the parameters map, validates grant types and scopes, and fills in scopes with the default values from the client if they are missing.

作者:
Dave Syer, Amanda Anganes

构造方法摘要
DefaultOAuth2RequestFactory(ClientDetailsService clientDetailsService)
           
 
方法摘要
 AuthorizationRequest createAuthorizationRequest(Map<String,String> authorizationParameters)
          Create a new AuthorizationRequest extracting all the needed information from the incoming parameter map, and initializing all individual fields on the AuthorizationRequest to reasonable values.
 OAuth2Request createOAuth2Request(AuthorizationRequest request)
          Create a new OAuth2Request by extracting the needed information from the current AuthorizationRequest object.
 OAuth2Request createOAuth2Request(ClientDetails client, TokenRequest tokenRequest)
          Create a new OAuth2Request by extracting the needed information from the current TokenRequest object.
 TokenRequest createTokenRequest(AuthorizationRequest authorizationRequest, String grantType)
          Create a new TokenRequest from an AuthorizationRequest.
 TokenRequest createTokenRequest(Map<String,String> requestParameters)
          Create a new TokenRequest by extracting the needed information from the incoming request parameter map.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

DefaultOAuth2RequestFactory

public DefaultOAuth2RequestFactory(ClientDetailsService clientDetailsService)
方法详细信息

createAuthorizationRequest

public AuthorizationRequest createAuthorizationRequest(Map<String,String> authorizationParameters)
从接口 OAuth2RequestFactory 复制的描述
Create a new AuthorizationRequest extracting all the needed information from the incoming parameter map, and initializing all individual fields on the AuthorizationRequest to reasonable values. When a class uses the factory to create an AuthorizationRequest, it should not need to access the parameter map directly afterwards. Typical implementations would initialize the individual fields on the AuthorizationRequest with the values requested in the original parameter map. It may also load the client details from the client id provided and validate the grant type and scopes, populating any fields in the request that are known only to the authorization server.

指定者:
接口 OAuth2RequestFactory 中的 createAuthorizationRequest
参数:
authorizationParameters - the parameters in the request
返回:
a new AuthorizationRequest

createOAuth2Request

public OAuth2Request createOAuth2Request(AuthorizationRequest request)
从接口 OAuth2RequestFactory 复制的描述
Create a new OAuth2Request by extracting the needed information from the current AuthorizationRequest object.

指定者:
接口 OAuth2RequestFactory 中的 createOAuth2Request
参数:
request - the request to be converted
返回:
an immutable object for storage

createTokenRequest

public TokenRequest createTokenRequest(Map<String,String> requestParameters)
从接口 OAuth2RequestFactory 复制的描述
Create a new TokenRequest by extracting the needed information from the incoming request parameter map.

指定者:
接口 OAuth2RequestFactory 中的 createTokenRequest
参数:
requestParameters - the parameters in the request
返回:
a new TokenRequest

createTokenRequest

public TokenRequest createTokenRequest(AuthorizationRequest authorizationRequest,
                                       String grantType)
从接口 OAuth2RequestFactory 复制的描述
Create a new TokenRequest from an AuthorizationRequest. Principally used by the AuthorizationEndpoint during the implicit flow.

指定者:
接口 OAuth2RequestFactory 中的 createTokenRequest
参数:
authorizationRequest - the incoming request
grantType - the grant type for the token request
返回:
a new token request

createOAuth2Request

public OAuth2Request createOAuth2Request(ClientDetails client,
                                         TokenRequest tokenRequest)
从接口 OAuth2RequestFactory 复制的描述
Create a new OAuth2Request by extracting the needed information from the current TokenRequest object.

指定者:
接口 OAuth2RequestFactory 中的 createOAuth2Request
参数:
client - TODO
tokenRequest - the request to be converted
返回:
am immutable object for storage


Copyright © 2013. All rights reserved.