Interface AuthenticationMechanism
public interface AuthenticationMechanism
This interface represents an authentication mechanism. Extend this interface
to write custom authentication mechanism.
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(AuthenticationMechanismContext context) This method is invoked by authentication service when it authenticates the user using this authentication mechanism.void
shutdown()
This method is invoked by authentication service when it destroys this authentication mechanism.void
startup
(Properties properties) This method is invoked by authentication service when it initializes this authentication mechanism.
-
Method Details
-
startup
This method is invoked by authentication service when it initializes this authentication mechanism. Authentication service passes the specified properties.- Parameters:
properties
- The properties.
-
execute
AuthenticationMechanismResult execute(AuthenticationMechanismContext context) throws AuthenticationMechanismException This method is invoked by authentication service when it authenticates the user using this authentication mechanism. Authentication service passes the specified authentication context, and expects this authentication mechanism to return an authentication result.- Parameters:
context
- The authentication context.- Returns:
- The authentication result.
- Throws:
AuthenticationMechanismException
- If this authentication mechanism is not able to authenticate the user.
-
shutdown
void shutdown()This method is invoked by authentication service when it destroys this authentication mechanism.
-