org.springframework.security.oauth2.provider.approval
接口 UserApprovalHandler

所有已知实现类:
DefaultUserApprovalHandler, TokenServicesUserApprovalHandler

public interface UserApprovalHandler

Basic interface for determining whether a given client authentication request has been approved by the current user.

作者:
Ryan Heaton, Dave Syer, Amanda Anganes

方法摘要
 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)
           Tests whether the specified authorization request has been approved by the current user (if there is one).
 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.
 

方法详细信息

isApproved

boolean isApproved(AuthorizationRequest authorizationRequest,
                   org.springframework.security.core.Authentication userAuthentication)

Tests whether the specified authorization request has been approved by the current user (if there is one).

参数:
authorizationRequest - the authorization request.
userAuthentication - the user authentication for the current user.
返回:
true if the request has been approved, false otherwise

checkForPreApproval

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). 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.

参数:
authorizationRequest - the authorization request.
userAuthentication - the user authentication
返回:
the AuthorizationRequest, modified if necessary

updateAfterApproval

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.

参数:
authorizationRequest - the authorization request.
userAuthentication - the user authentication
返回:
the AuthorizationRequest, modified if necessary


Copyright © 2013. All rights reserved.