Develop with JAAS to log in programmatically

Java Authentication and Authorization Service (JAAS) represents the strategic APIs for authentication and replaces the CORBA programmatic login APIs. Additionally, WebSphere Application Server - Express has provides some extensions to JAAS.

If the application is using a custom JAAS login configuration, make sure that the custom JAAS login configuration is properly defined. For more information, see Configure JAAS login configuration.

Some of the JAAS APIs are protected by Java 2 Security permissions, if these APIs are used by application code, please make sure that these permissions are added to the application was.policy file. See The was.policy file for more information. For more details of which APIs are protected by Java 2 Security permissions, please check the J2SDK, JAAS, and WebSphere Application Server - Express APIs javadoc for more details. The following lists some of the APIs used in the sample code in this documentation and the Java 2 Security permissions required by these APIs:

WebSphere Application Server - Express provides these extensions to JAAS:

For programmatic login with JAAS, the product provides an implementation of the javax.security.auth.callback.CallbackHandler interface, which is called com.ibm.websphere.security.auth.callback.WSCallbackHandlerImpl. Go to API documentation This com.ibm.websphere.security.auth.callback.WSCallbackHandlerImpl allows application to "push" authentication data to the WebSphere LoginModule to perform authentication. This can be useful for server side application code to authenticate an identity and use the identity to invoke downstream J2EE resources. See Example: JAAS programmatic login for more information.

See the following topics for more information about using JAAS with WebSphere Application Server - Express: