Class FluentAccessCheck
- java.lang.Object
-
- com.identityworksllc.iiq.common.access.FluentAccessCheck
-
public class FluentAccessCheck extends Object
Implements a fluent API for access checks.Use
AccessCheck.setup()
to begin one of these chains.- See Also:
AccessCheck.setup()
-
-
Constructor Summary
Constructors Constructor Description FluentAccessCheck()
Constructs a new FluentAccessCheck object with an empty input config
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FluentAccessCheck
config(CommonSecurityConfig config)
Sets the security config for this access checkFluentAccessCheck
config(Map<String,Object> config)
Sets the security config for this access checkFluentAccessCheck
debug()
Sets debug mode to true for this access checkAccessCheckResponse
execute()
Validates and executes the constructedAccessCheck
, returning the response.boolean
isAllowed()
Returns true if this access check passes for the current configurationFluentAccessCheck
name(String name)
FluentAccessCheck
state(String name, Object value)
FluentAccessCheck
state(Map<String,Object> state)
FluentAccessCheck
subject(sailpoint.api.SailPointContext ctx, sailpoint.object.Identity subject)
FluentAccessCheck
subject(sailpoint.api.SailPointContext ctx, sailpoint.object.Identity subject, String pluginName)
FluentAccessCheck
subject(sailpoint.web.UserContext userContext)
FluentAccessCheck
target(String targetName)
FluentAccessCheck
target(sailpoint.object.Identity target)
-
-
-
Constructor Detail
-
FluentAccessCheck
public FluentAccessCheck()
Constructs a new FluentAccessCheck object with an empty input config
-
-
Method Detail
-
execute
public AccessCheckResponse execute() throws AccessCheckException
Validates and executes the constructedAccessCheck
, returning the response.- Returns:
- The response from
AccessCheck.accessCheck(AccessCheckInput)
. - Throws:
AccessCheckException
- if the validation or access check fails- See Also:
AccessCheck.accessCheck(AccessCheckInput)
-
config
public FluentAccessCheck config(Map<String,Object> config) throws sailpoint.tools.GeneralException
Sets the security config for this access check- Parameters:
config
- The security config- Returns:
- This object, for chaining
- Throws:
sailpoint.tools.GeneralException
- if parsing the Map into aCommonSecurityConfig
fails- See Also:
CommonSecurityConfig.decode(Map)
-
config
public FluentAccessCheck config(CommonSecurityConfig config)
Sets the security config for this access check- Parameters:
config
- The security config- Returns:
- This object, for chaining
-
debug
public FluentAccessCheck debug()
Sets debug mode to true for this access check- Returns:
- This object, for chaining
- See Also:
AccessCheckInput.setDebug(boolean)
-
isAllowed
public boolean isAllowed() throws AccessCheckException
Returns true if this access check passes for the current configuration- Returns:
- True if this access check passes, false otherwise
- Throws:
AccessCheckException
- if the configuration is not valid- See Also:
AccessCheckResponse.isAllowed()
-
name
public FluentAccessCheck name(String name)
-
state
public FluentAccessCheck state(Map<String,Object> state)
-
state
public FluentAccessCheck state(String name, Object value)
-
subject
public FluentAccessCheck subject(sailpoint.api.SailPointContext ctx, sailpoint.object.Identity subject, String pluginName)
-
subject
public FluentAccessCheck subject(sailpoint.api.SailPointContext ctx, sailpoint.object.Identity subject)
-
subject
public FluentAccessCheck subject(sailpoint.web.UserContext userContext)
-
target
public FluentAccessCheck target(String targetName)
-
target
public FluentAccessCheck target(sailpoint.object.Identity target)
-
-