org.springframework.security.oauth2.provider.approval
Interface UserApprovalHandler

All Known Implementing Classes:
DefaultUserApprovalHandler, SparklrUserApprovalHandler, TokenServicesUserApprovalHandler

public interface UserApprovalHandler

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

Author:
Ryan Heaton, Dave Syer

Method Summary
 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 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.
 

Method Detail

updateBeforeApproval

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.

Parameters:
authorizationRequest - the authorization request.
userAuthentication - TODO
Returns:
a new instance or the same one if no changes are required

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

Parameters:
authorizationRequest - the authorization request.
userAuthentication - the user authentication for the current user.
Returns:
a new instance or the same one if no changes are required


Copyright © 2012. All Rights Reserved.