Package org.opensaml.profile.action.impl
Class CheckAccess
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.impl.CheckAccess
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction
This action validates that a request comes from an authorized client, based on an injected service
and policy parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private Function<ProfileRequestContext,String> Lookup strategy for operation.private Function<ProfileRequestContext,String> Lookup strategy for policy to apply.private Function<ProfileRequestContext,String> Lookup strategy for resource.private AccessControlServiceAccess control service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoExecute(ProfileRequestContext profileRequestContext) Performs this action.protected voidbooleandoPreExecute(ProfileRequestContext profileRequestContext) Called prior to execution, actions may override this method to perform pre-processing for a request.voidSet the service to use.voidsetOperation(String op) Set operation.voidSet a lookup strategy to use to obtain the operation.voidsetPolicyName(String name) Set an explicit policy name to apply.voidSet a lookup strategy to use to obtain the policy name to apply.voidsetResource(String res) Set resource.voidSet a lookup strategy to use to obtain the resource.Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, setHttpServletRequest, setHttpServletRequestSupplier, setHttpServletResponse, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
service
Access control service. -
policyNameLookupStrategy
Lookup strategy for policy to apply. -
operationLookupStrategy
Lookup strategy for operation. -
resourceLookupStrategy
Lookup strategy for resource.
-
-
Constructor Details
-
CheckAccess
public CheckAccess()Constructor.
-
-
Method Details
-
setAccessControlService
Set the service to use.- Parameters:
acs- service to use
-
setPolicyNameLookupStrategy
Set a lookup strategy to use to obtain the policy name to apply.- Parameters:
strategy- lookup strategy- Since:
- 3.3.0
-
setPolicyName
Set an explicit policy name to apply.- Parameters:
name- policy name
-
setOperationLookupStrategy
Set a lookup strategy to use to obtain the operation.- Parameters:
strategy- lookup strategy- Since:
- 3.3.0
-
setOperation
Set operation.- Parameters:
op- operation
-
setResourceLookupStrategy
Set a lookup strategy to use to obtain the resource.- Parameters:
strategy- lookup strategy- Since:
- 3.3.0
-
setResource
Set resource.- Parameters:
res- resource
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
Called prior to execution, actions may override this method to perform pre-processing for a request.If false is returned, execution will not proceed, and the action should attach an
EventContextto the context tree to signal how to continue with overall workflow processing.If returning successfully, the last step should be to return the result of the superclass version of this method.
- Overrides:
doPreExecutein classAbstractProfileAction- Parameters:
profileRequestContext- the current IdP profile request context- Returns:
- true iff execution should proceed
-
doExecute
Performs this action. Actions must override this method to perform their work.- Overrides:
doExecutein classAbstractProfileAction- Parameters:
profileRequestContext- the current IdP profile request context
-