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.Logger
Class 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 AccessControlService
Access control service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doExecute
(ProfileRequestContext profileRequestContext) Performs this action.protected void
boolean
doPreExecute
(ProfileRequestContext profileRequestContext) Called prior to execution, actions may override this method to perform pre-processing for a request.void
Set the service to use.void
setOperation
(String op) Set operation.void
Set a lookup strategy to use to obtain the operation.void
setPolicyName
(String name) Set an explicit policy name to apply.void
Set a lookup strategy to use to obtain the policy name to apply.void
setResource
(String res) Set resource.void
Set a lookup strategy to use to obtain the resource.Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
doInitialize
in 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
EventContext
to 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:
doPreExecute
in 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:
doExecute
in classAbstractProfileAction
- Parameters:
profileRequestContext
- the current IdP profile request context
-