org.springframework.security.oauth2.provider.approval
Class DefaultUserApprovalHandler
java.lang.Object
org.springframework.security.oauth2.provider.approval.DefaultUserApprovalHandler
- All Implemented Interfaces:
- UserApprovalHandler
public class DefaultUserApprovalHandler
- extends Object
- implements UserApprovalHandler
A default user approval handler that doesn't remember any decisions.
- Author:
- Dave Syer
|
Method Summary |
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)
|
AuthorizationRequest |
updateBeforeApproval(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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultUserApprovalHandler
public DefaultUserApprovalHandler()
setApprovalParameter
public void setApprovalParameter(String approvalParameter)
- Parameters:
approvalParameter - the approvalParameter to set
updateBeforeApproval
public AuthorizationRequest updateBeforeApproval(AuthorizationRequest authorizationRequest,
org.springframework.security.core.Authentication userAuthentication)
- Description copied from interface:
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.
- Specified by:
updateBeforeApproval in interface UserApprovalHandler
- Parameters:
authorizationRequest - the authorization request.userAuthentication - TODO
- Returns:
- a new instance or the same one if no changes are required
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.
- Specified by:
isApproved in interface UserApprovalHandler
- Parameters:
authorizationRequest - The authorization request.userAuthentication - the current user authentication
- Returns:
- Whether the specified request has been approved by the current user.
Copyright © 2012. All Rights Reserved.