|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SK.gnome.dwarf.GenericService SK.gnome.dwarf.auth.JAASAuthenticator
Defines the login module-based authentication service.
It uses the javax.security.auth.login package to login and logout the subjects.
Field Summary |
Fields inherited from class SK.gnome.dwarf.GenericService |
initParameters, parent |
Fields inherited from interface SK.gnome.dwarf.Service |
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED |
Constructor Summary | |
JAASAuthenticator(java.lang.String name)
Creates a new JAASAuthenticator. |
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. |
java.lang.String |
report()
Returns the service report. |
Methods inherited from class SK.gnome.dwarf.GenericService |
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, getPrincipal, getShutdownTimeout, getState, init, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, shutdown, start, stop, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JAASAuthenticator(java.lang.String name)
Method Detail |
public AuthId login(java.lang.String facility, javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler) throws javax.security.auth.login.LoginException
A new LoginContext is instantiated with the facility, subject and
handler arguments and the LoginContext.login() method is invoked.
The LoginContext instance is stored internally, referenced by the AuthId
object key.
login
in interface Authenticator
facility
- the authentication facilitysubject
- the subject to log inhandler
- the callback handler
javax.security.auth.login.LoginException
- if the login operation failspublic void logout(java.lang.String facility, AuthId id, javax.security.auth.Subject subject) throws javax.security.auth.login.LoginException
The stored LoginContext instance is obtained by the AuthId
object key
and the LoginContext.logout() method is invoked. Then the LoginContext
instance is removed from the internal store.
The facility argument is ignored by this method since the LoginContext object is directly accessible by the given id key.
logout
in interface Authenticator
facility
- the authentication facilityid
- the authentication identifiersubject
- the subject to log out
javax.security.auth.login.LoginException
- if the logout operation failspublic java.lang.String report()
Returns the current/peak/total number of the active LoginContext instances.
report
in interface Reportable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |