com.ibm.wsspi.wssecurity.auth.module
Class WSSecurityMappingModule

java.lang.Object
  |
  +--com.ibm.wsspi.wssecurity.auth.module.WSSecurityMappingModule
All Implemented Interfaces:
Constants, javax.security.auth.spi.LoginModule
Direct Known Subclasses:
IDAssertionLoginModule, SignatureLoginModule

public class WSSecurityMappingModule
extends java.lang.Object
implements javax.security.auth.spi.LoginModule, Constants

This Login Module will take a DN and map it to a WSPrincipal and WSCredential. This is used by pluggable token the ability to map a validated DN to a WSPrincipal and WSCredential by using the stackable Login Module configuration provided by JAAS.

This is not a standalone Login Module, it must be configured after the pluggable JAAS Login Module. The pluggable token JAAS Login Module must save the validated DN in the shared state hash map passed in the initialize method and the key used is com.ibm.wsspi.wssecurity.Constants.WSSECURITY_DN.

After the login phase and login is successful, a com.ibm.websphere.security.cred.WSCredential is placed in the shared state and the key is com.ibm.wsspi.wssecurity.Constants.WSSECURITY_CRED.

Version:
5.02
See Also:
LoginModule, Constants, WSCredential

Field Summary
protected  com.ibm.websphere.security.cred.WSCredential wscred
           
protected  com.ibm.websphere.security.auth.WSPrincipal wsprin
           
 
Fields inherited from interface com.ibm.wsspi.wssecurity.Constants
WSSECURITY_CRED, WSSECURITY_DN
 
Constructor Summary
WSSecurityMappingModule()
           
 
Method Summary
 boolean abort()
           
 boolean commit()
           
 void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)
           
 boolean login()
           
 boolean logout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wscred

protected com.ibm.websphere.security.cred.WSCredential wscred

wsprin

protected com.ibm.websphere.security.auth.WSPrincipal wsprin
Constructor Detail

WSSecurityMappingModule

public WSSecurityMappingModule()
Method Detail

initialize

public void initialize(javax.security.auth.Subject subject,
                       javax.security.auth.callback.CallbackHandler callbackHandler,
                       java.util.Map sharedState,
                       java.util.Map options)
Specified by:
initialize in interface javax.security.auth.spi.LoginModule

login

public boolean login()
              throws javax.security.auth.login.LoginException
Specified by:
login in interface javax.security.auth.spi.LoginModule

commit

public boolean commit()
               throws javax.security.auth.login.LoginException
Specified by:
commit in interface javax.security.auth.spi.LoginModule

abort

public boolean abort()
              throws javax.security.auth.login.LoginException
Specified by:
abort in interface javax.security.auth.spi.LoginModule

logout

public boolean logout()
               throws javax.security.auth.login.LoginException
Specified by:
logout in interface javax.security.auth.spi.LoginModule