|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.security.oauth2.provider.approval.ApprovalStoreUserApprovalHandler
public class ApprovalStoreUserApprovalHandler
A user approval handler that remembers approval decisions by consulting existing approvals.
| Constructor Summary | |
|---|---|
ApprovalStoreUserApprovalHandler()
|
|
| Method Summary | |
|---|---|
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)
Tests whether the specified authorization request has been approved by the current user (if there is one). |
void |
setApprovalExpiryInSeconds(int approvalExpirySeconds)
|
void |
setApprovalStore(ApprovalStore store)
|
void |
setClientDetailsService(ClientDetailsService clientDetailsService)
Service to load client details (optional) for auto approval checks. |
void |
setRequestFactory(OAuth2RequestFactory requestFactory)
|
void |
setScopePrefix(String scopePrefix)
The prefix applied to incoming parameters that signal approval or denial of a scope. |
AuthorizationRequest |
updateAfterApproval(AuthorizationRequest authorizationRequest,
org.springframework.security.core.Authentication userAuthentication)
Requires the authorization request to be explicitly approved, including all individual scopes, and the user to be authenticated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApprovalStoreUserApprovalHandler()
| Method Detail |
|---|
public void setClientDetailsService(ClientDetailsService clientDetailsService)
clientDetailsService - a client details servicepublic void setScopePrefix(String scopePrefix)
scopePrefix - the prefix (default OAuth2Utils.SCOPE_PREFIX)public void setApprovalStore(ApprovalStore store)
store - the approval to setpublic void setRequestFactory(OAuth2RequestFactory requestFactory)
public void setApprovalExpiryInSeconds(int approvalExpirySeconds)
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
public boolean isApproved(AuthorizationRequest authorizationRequest,
org.springframework.security.core.Authentication userAuthentication)
UserApprovalHandlerTests whether the specified authorization request has been approved by the current user (if there is one).
isApproved in interface UserApprovalHandlerauthorizationRequest - the authorization request.userAuthentication - the user authentication for the current user.
public AuthorizationRequest checkForPreApproval(AuthorizationRequest authorizationRequest,
org.springframework.security.core.Authentication userAuthentication)
UserApprovalHandlerProvides 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.
checkForPreApproval in interface UserApprovalHandlerauthorizationRequest - the authorization request.userAuthentication - the user authentication
public AuthorizationRequest updateAfterApproval(AuthorizationRequest authorizationRequest,
org.springframework.security.core.Authentication userAuthentication)
scope.<scopename> equal to "true" or "approved" (otherwise it will be assumed to
have been denied). The ApprovalStore will be updated to reflect the inputs.
updateAfterApproval in interface UserApprovalHandlerauthorizationRequest - The authorization request.userAuthentication - the current user authentication
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||