Name
AuthProvider
Synopsis
This
subclass of Provider
defines methods that allow
users to “log in” before using the
provider’s services. An implementation of the
login( )
method should use the supplied
javax.security.auth.callback.CallbackHandler
class
to request the user’s password or other
authentication credentials. If no callback handler is passed to
login( )
, it should use the one registered with
setCallbackHandler( )
or a default.
Figure 14-3. java.security.AuthProvider
public abstract class AuthProvider extends Provider { // Protected Constructors protected AuthProvider(String name, double version, String info); // Public Instance Methods public abstract void login(javax.security.auth.Subject subject, javax. security.auth.callback.CallbackHandler handler) throws javax.security.auth.login.LoginException; public abstract void logout( ) throws javax.security.auth.login.LoginException; public abstract void setCallbackHandler(javax.security.auth.callback. CallbackHandler handler); }
Get Java in a Nutshell, 5th Edition 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.