Class IotAuthenticationNode
- All Implemented Interfaces:
Node
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefines the possible outcomes from this node.static interfaceConfiguration for the node.static enumThe JWT authentication method used to verify the JWT presented for authentication.Nested classes/interfaces inherited from interface org.forgerock.openam.auth.node.api.Node
Node.Metadata, Node.VersionMetadata -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.forgerock.openam.core.CoreWrapperprotected static final Stringprotected final IdentityStoreprotected static final Stringprotected static final Stringprotected static final Stringprotected final Realmprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionIotAuthenticationNode(Realm realm, IotAuthenticationNode.Config config, org.forgerock.openam.core.CoreWrapper coreWrapper, IdentityStoreFactory identityStoreFactory, org.forgerock.am.iot.JwtProofOfPossessionVerifier.Factory popVerifierFactory, org.forgerock.am.iot.ClientAssertionVerifier.Factory assertionVerifierFactory, JwtBuilderFactory jwtBuilderFactory) Create an instance of theIotAuthenticationNode. -
Method Summary
Modifier and TypeMethodDescriptioncallbackRequired(TreeContext context) protected StringcreateChallenge(TreeContext context) protected Actionprotected StringgetChallenge(TreeContext context) Provide a list of shared state data a node consumes.protected SignedJwtgetJWT(TreeContext context) protected SignedJwtgetJWT(TreeContext context, String callbackId) Provide a list of shared state data a node provides.process(TreeContext context) Performs processing on the given shared state, which holds all the data gathered by nodes that have already executed as part of this authentication session in the tree.protected ActionsuccessAction(org.forgerock.am.iot.VerifiedClaimSet verifiedClaims, TreeContext context, boolean requiresTokenRestriction) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.forgerock.openam.auth.node.api.Node
getAuditEntryDetail
-
Field Details
-
JWT_CHALLENGE_KEY
- See Also:
-
JWT_VERIFIED_CLAIMS_KEY
- See Also:
-
JWT_ADDITIONAL_AUDIENCES_KEY
- See Also:
-
REQUIRES_TOKEN_RESTRICTION_KEY
- See Also:
-
SUCCESS_OUTCOME
- See Also:
-
FAILURE_OUTCOME
- See Also:
-
REGISTER_OUTCOME
- See Also:
-
alwaysOnSuccess
-
alwaysOnRegister
-
sometimesOnSuccess
-
realm
-
coreWrapper
protected final org.forgerock.openam.core.CoreWrapper coreWrapper -
identityStore
-
-
Constructor Details
-
IotAuthenticationNode
@Inject public IotAuthenticationNode(Realm realm, IotAuthenticationNode.Config config, org.forgerock.openam.core.CoreWrapper coreWrapper, IdentityStoreFactory identityStoreFactory, org.forgerock.am.iot.JwtProofOfPossessionVerifier.Factory popVerifierFactory, org.forgerock.am.iot.ClientAssertionVerifier.Factory assertionVerifierFactory, JwtBuilderFactory jwtBuilderFactory) Create an instance of theIotAuthenticationNode.- Parameters:
realm- the realm in which to create the node.config- the node configuration.coreWrapper- wrapper for abstracting core AM functionality.popVerifierFactory- factory for creating JwtProofOfPossessionVerifier.assertionVerifierFactory- factory for creating ClientAssertionVerifier.jwtBuilderFactory- factory for creating JwtBuilder.identityStoreFactory- factory for creating the identity store.
-
-
Method Details
-
callbackRequired
-
getInputs
Description copied from interface:NodeProvide a list of shared state data a node consumes.An
InputStateconsists of a property name and an "isRequired" flag. The IsRequired flag indicates whether the input is required in order for the node to function. If the flag is false this indicates that the node will consume this data if it is present but it is not required for the node to function.Example:
public InputState[] getInputs() { return new InputState[] { new InputState(IDENTITY), new InputState("foo", false) }; }In this example the node declares that it requires state to contain a property named IDENTITY and that it will consume a property named "foo" if it is present. If "foo" is not present then the node will still function but may be skipping some functionality.This list is used to ensure that state data, both shared and transient, from upstream nodes is left intact for this node to access. If inputs are not declared there is no guarantee that the data needed by the node will still be present in state when the node executes.
- Returns:
- The list of shared state data.
-
getOutputs
Description copied from interface:NodeProvide a list of shared state data a node provides.An
OutputStateconsists of a property name and a map of node outcomes to a flag indicating whether that outcome is guaranteed to produce that property in state. Any given output may be provided for all outcomes or any subset of outcomes and perhaps only optionally for some of them.Example:
public OutputState[] getOutputs() { return new OutputState[] { new OutputState(PASSWORD), new OutputState(config.mode(), singletonMap("*", false) }; }In this example we declare that the node will produce an output named PASSWORD. The lack of an outcome map indicates that this output is provided for all outcomes. The node also outputs a property named via config.mode() that is optional for all of the node's outcomes, i.e. it may or may not be present for downstream nodes to consume. This type of output is best consumed by other nodes by declaring an InputState such as new InputState(config.mode(), false).- Returns:
- The list of shared state data.
-
process
Description copied from interface:NodePerforms processing on the given shared state, which holds all the data gathered by nodes that have already executed as part of this authentication session in the tree.This method is invoked when the node is reached in the tree.
- Specified by:
processin interfaceNode- Parameters:
context- The context of the tree authentication.- Returns:
- The next action to perform. Must not be null.
- Throws:
NodeProcessException- If there was a problem processing that could not be resolved to a single outcome.
-
createChallenge
-
failureAction
-
successAction
protected Action successAction(org.forgerock.am.iot.VerifiedClaimSet verifiedClaims, TreeContext context, boolean requiresTokenRestriction) throws Exception - Throws:
Exception
-
getChallenge
- Throws:
NodeProcessException
-
getJWT
- Throws:
NodeProcessException
-
getJWT
- Throws:
NodeProcessException
-