
The login process is initiated by an access request to an application running on the AS Java. For example, when a user requests access to a Web application from a Web application client, the Web container where the application is running prompts the user to log in upon first request to a protected resource of the application.
Based on the policy configuration information from the application's deployment descriptors, the AS Java creates a new instance of the LoginContext class for the login.
The LoginContext uses the policy configurations for the AS Java applications to obtain information about the required authorizations and authentication checks that must be met for granting access to the application. The authentication checks, in turn, are implemented by authentication schemes or JAAS login modules, which enable pluggable authentication independent of the application code.
For an overview of the login process phases, see the figure below.
Login Process Flow in JAAS
The login process consists of the following phases:
Each login module completes the user authentication in two phases:
The login process is successful if the user is authenticated by the login modules in the authentication stack that must succeed (that is, the commit() method for these login modules returns control to the accessed application). You can choose the order in which the login modules are called during the authentication process using the login module flags defined in the JAAS specification.
For more information about the login module flags and authentication stacks, see AS Java Authentication Infrastructure .