SK.gnome.dwarf.auth
Interface Authenticator

All Known Implementing Classes:
JAASAuthenticator

public interface Authenticator

Provides interface for the authentication services.

This interface should be implemented by services which can do the real authentication, i.e. they are able to login and logout the given subject by checking its username, password, or any other security credentials against the user database. Sometimes they are called also authentication adapters.


Method Summary
 AuthId login(java.lang.String facility, javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler)
          Authenticates the subject.
 void logout(java.lang.String facility, AuthId id, javax.security.auth.Subject subject)
          Logouts the subject.
 

Method Detail

login

public AuthId login(java.lang.String facility,
                    javax.security.auth.Subject subject,
                    javax.security.auth.callback.CallbackHandler handler)
             throws javax.security.auth.login.LoginException
Authenticates the subject.

The AuthId object relates the login and logout operations, thus enabling multiple authentication of a single subject.

Parameters:
facility - the authentication facility
subject - the subject to log in
handler - the callback handler
Returns:
the authentication identifier
Throws:
javax.security.auth.login.LoginException - if the login operation fails

logout

public void logout(java.lang.String facility,
                   AuthId id,
                   javax.security.auth.Subject subject)
            throws javax.security.auth.login.LoginException
Logouts the subject.

The AuthId object must reference the previous login operation used to authenticate the subject.

Parameters:
facility - the authentication facility
id - the authentication identifier
subject - the subject to log out
Throws:
javax.security.auth.login.LoginException - if the logout operation fails


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.