Package org.opensaml.profile.action.impl
Class CheckAccess
java.lang.Object
net.shibboleth.shared.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 voidvoidSet 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, doPreExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.shared.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
-
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
-
doExecute
Performs this action. Actions must override this method to perform their work.- Overrides:
doExecutein classAbstractProfileAction- Parameters:
profileRequestContext- the current IdP profile request context