|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.kernel.security.MappingLoginModule
Superclass of LoginModules that map usernames to user IDs. Translates the username provided by the user into a numeric user ID used within ACS. A subclass of this class is needed in any login configuration that uses a PasswordLoginModule.
Field Summary | |
static String |
versionId
|
Constructor Summary | |
MappingLoginModule()
|
Method Summary | |
boolean |
abort()
Trivial implementation; does nothing. |
boolean |
commit()
Adds the user ID to the Subject in a PartyPrincipal. |
protected abstract BigDecimal |
getUserID(String username)
Maps a username to a user ID. |
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler handler,
Map shared,
Map options)
|
boolean |
login()
Reads the username from the shared data and calls getUserID . |
boolean |
logout()
Trivial implementation; does nothing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public MappingLoginModule()
Method Detail |
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, Map shared, Map options)
initialize
in interface javax.security.auth.spi.LoginModule
public boolean login() throws javax.security.auth.login.LoginException
getUserID
.
login
in interface javax.security.auth.spi.LoginModule
true
.
javax.security.auth.login.FailedLoginException
- if no username is available.
javax.security.auth.login.LoginException
- if an error occurs. Propagates exceptions
thrown by getUserID
.getUserID(String)
protected abstract BigDecimal getUserID(String username) throws AccountNotFoundException, javax.security.auth.login.LoginException
username
- the username to map
AccountNotFoundException
- if no user ID exists for the given
username.
javax.security.auth.login.LoginException
- if an error occurs.public boolean commit() throws javax.security.auth.login.LoginException
commit
in interface javax.security.auth.spi.LoginModule
true
.
javax.security.auth.login.LoginException
public boolean abort() throws javax.security.auth.login.LoginException
abort
in interface javax.security.auth.spi.LoginModule
true
.
javax.security.auth.login.LoginException
public boolean logout() throws javax.security.auth.login.LoginException
logout
in interface javax.security.auth.spi.LoginModule
true
.
javax.security.auth.login.LoginException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |