org.springframework.security.oauth2.provider.approval
类 TokenServicesUserApprovalHandler

java.lang.Object
  继承者 org.springframework.security.oauth2.provider.approval.TokenServicesUserApprovalHandler
所有已实现的接口:
org.springframework.beans.factory.InitializingBean, UserApprovalHandler

public class TokenServicesUserApprovalHandler
extends Object
implements UserApprovalHandler, org.springframework.beans.factory.InitializingBean

A user approval handler that remembers approval decisions by consulting existing tokens.

作者:
Dave Syer

构造方法摘要
TokenServicesUserApprovalHandler()
           
 
方法摘要
 void afterPropertiesSet()
           
 AuthorizationRequest checkForPreApproval(AuthorizationRequest authorizationRequest, org.springframework.security.core.Authentication userAuthentication)
           Provides a hook for allowing requests to be pre-approved (skipping the User Approval Page).
 boolean isApproved(AuthorizationRequest authorizationRequest, org.springframework.security.core.Authentication userAuthentication)
          Basic implementation just requires the authorization request to be explicitly approved and the user to be authenticated.
 void setApprovalParameter(String approvalParameter)
           
 void setRequestFactory(OAuth2RequestFactory requestFactory)
           
 void setTokenServices(AuthorizationServerTokenServices tokenServices)
           
 AuthorizationRequest updateAfterApproval(AuthorizationRequest authorizationRequest, org.springframework.security.core.Authentication userAuthentication)
           Provides an opportunity to update the authorization request before it is checked for approval in cases where the incoming approval parameters contain richer information than just true/false (e.g. some scopes are approved, and others are rejected), implementations may need to be able to modify the AuthorizationRequest before a token is generated from it.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

TokenServicesUserApprovalHandler

public TokenServicesUserApprovalHandler()
方法详细信息

setApprovalParameter

public void setApprovalParameter(String approvalParameter)
参数:
approvalParameter - the approvalParameter to set

setTokenServices

public void setTokenServices(AuthorizationServerTokenServices tokenServices)
参数:
tokenServices - the token services to set

setRequestFactory

public void setRequestFactory(OAuth2RequestFactory requestFactory)

afterPropertiesSet

public void afterPropertiesSet()
指定者:
接口 org.springframework.beans.factory.InitializingBean 中的 afterPropertiesSet

isApproved

public boolean isApproved(AuthorizationRequest authorizationRequest,
                          org.springframework.security.core.Authentication userAuthentication)
Basic implementation just requires the authorization request to be explicitly approved and the user to be authenticated.

指定者:
接口 UserApprovalHandler 中的 isApproved
参数:
authorizationRequest - The authorization request.
userAuthentication - the current user authentication
返回:
Whether the specified request has been approved by the current user.

checkForPreApproval

public AuthorizationRequest checkForPreApproval(AuthorizationRequest authorizationRequest,
                                                org.springframework.security.core.Authentication userAuthentication)
从接口 UserApprovalHandler 复制的描述

Provides a hook for allowing requests to be pre-approved (skipping the User Approval Page). Some implementations may allow users to store approval decisions so that they only have to approve a site once. This method is called in the AuthorizationEndpoint before sending the user to the Approval page. If this method sets oAuth2Request.approved to true, the Approval page will be skipped.

指定者:
接口 UserApprovalHandler 中的 checkForPreApproval
参数:
authorizationRequest - the authorization request.
userAuthentication - the user authentication
返回:
the AuthorizationRequest, modified if necessary

updateAfterApproval

public AuthorizationRequest updateAfterApproval(AuthorizationRequest authorizationRequest,
                                                org.springframework.security.core.Authentication userAuthentication)
从接口 UserApprovalHandler 复制的描述

Provides an opportunity to update the authorization request before it is checked for approval in cases where the incoming approval parameters contain richer information than just true/false (e.g. some scopes are approved, and others are rejected), implementations may need to be able to modify the AuthorizationRequest before a token is generated from it.

指定者:
接口 UserApprovalHandler 中的 updateAfterApproval
参数:
authorizationRequest - the authorization request.
userAuthentication - the user authentication
返回:
the AuthorizationRequest, modified if necessary


Copyright © 2013. All rights reserved.