Authentication with JAAS

As we develop any secure application, we must make certain that the user who is running the program is in fact the user we expected. This requires a login process. Almost every user interface requires a login process. If ever there was a process with code reuse potential, it is the login process. This point was not lost on JAAS designers.

JAAS authentication revolves around the LoginModule (javax.security.auth.spi.LoginModule). The LoginModule is a pluggable interface that provides the login services and completes the connection of the authentication process with the Subject. The implementation of the LoginModule is loaded by a LoginContext, which controls the login process. The LoginContext can optionally work with a ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.