Interface TreeHook
A TreeHook encapsulates some functionality that should be executed at the end of a tree, after authentication.
They can be added by nodes.
The following parameters can be injected into the constructor of a class implementing this interface using the
Assisted annotation:
SSOToken - the token containing details of the new session created on successful completion
of an authentication journey
Response - the response sent to the user on successful completion
of an authentication journey
Request - the request submitted by the user agent
Realm - the realm in which the authentication is taking place
-
config - the node configuration object; the type of this configuration is defined
by the annotation
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic @interfaceAnnotation that describes the metadata of the node. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept()Main method that will contain the logic that needs to be executed when the session hook is called.default voidMain method that will contain the logic that needs to be executed on tree exception.default voidMain method that will contain the logic that needs to be executed on tree failure.
-
Field Details
-
SESSION_HOOK_CLASS_KEY
Session hook class key.- See Also:
-
NODE_ID_KEY
Node ID key.- See Also:
-
NODE_TYPE_KEY
Node type key.- See Also:
-
NODE_CONFIG_KEY
Node config key.- See Also:
-
HOOK_DATA
Arguments for the session hook.- See Also:
-
-
Method Details
-
accept
Main method that will contain the logic that needs to be executed when the session hook is called.- Throws:
TreeHookException- if an exception occurs.
-
acceptFailure
Main method that will contain the logic that needs to be executed on tree failure. The session cannot be read or modified on failure.- Throws:
TreeHookException- if an exception occurs.
-
acceptException
Main method that will contain the logic that needs to be executed on tree exception. The session cannot be read or modified on exception.- Throws:
TreeHookException- if an exception occurs.
-