org.springframework.security.oauth.examples.sparklr.oauth
Class SparklrUserApprovalHandler
java.lang.Object
org.springframework.security.oauth2.provider.approval.TokenServicesUserApprovalHandler
org.springframework.security.oauth.examples.sparklr.oauth.SparklrUserApprovalHandler
- All Implemented Interfaces:
- InitializingBean, UserApprovalHandler
public class SparklrUserApprovalHandler
- extends TokenServicesUserApprovalHandler
- Author:
- Dave Syer
|
Method Summary |
boolean |
isApproved(AuthorizationRequest authorizationRequest,
org.springframework.security.core.Authentication userAuthentication)
Allows automatic approval for a white list of clients in the implicit grant case. |
void |
setAutoApproveClients(Collection<String> autoApproveClients)
|
void |
setUseTokenServices(boolean useTokenServices)
|
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 |
SparklrUserApprovalHandler
public SparklrUserApprovalHandler()
setUseTokenServices
public void setUseTokenServices(boolean useTokenServices)
- Parameters:
useTokenServices - the useTokenServices to set
setAutoApproveClients
public void setAutoApproveClients(Collection<String> autoApproveClients)
- Parameters:
autoApproveClients - the auto approve clients 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- Overrides:
updateBeforeApproval in class TokenServicesUserApprovalHandler
- 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)
- Allows automatic approval for a white list of clients in the implicit grant case.
- Specified by:
isApproved in interface UserApprovalHandler- Overrides:
isApproved in class TokenServicesUserApprovalHandler
- 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.