commit() method

Method to commit the authentication process.

Syntax

boolean commit ()

Returns

true if this method succeeded, or false if this LoginModule should be ignored.

Exceptions

Usage

This method is called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded). If this LoginModule's own authentication attempt succeeded (checked by retrieving the private state saved by the login method), then this method associates relevant Principals and Credentials with the Subject located in the LoginModule. If this LoginModule's own authentication attempted failed, then this method removes/destroys any state that was originally saved.

true if this method succeeded, or false if this LoginModule should be ignored.