net.ontopia.topicmaps.nav2.realm
Class TMLoginModule

java.lang.Object
  extended by net.ontopia.topicmaps.nav2.realm.TMLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

public class TMLoginModule
extends java.lang.Object
implements javax.security.auth.spi.LoginModule

INTERNAL: TMLoginModule provides authentication to web applications by checking user credentials against information stored in a topicmap.


Field Summary
protected  java.lang.String topicmapId
           
 
Constructor Summary
TMLoginModule()
           
 
Method Summary
 boolean abort()
           
 boolean commit()
          Add relevant Principals to the subject.
protected  TopicMapIF getTopicMap()
           
static java.lang.String hashPassword(java.lang.String username, java.lang.String password, java.lang.String hashMethod)
           
 void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,?> sharedState, java.util.Map<java.lang.String,?> options)
           
 boolean login()
          Prompt the user for username and password, and verify those.
 boolean logout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topicmapId

protected java.lang.String topicmapId
Constructor Detail

TMLoginModule

public TMLoginModule()
Method Detail

abort

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

commit

public boolean commit()
               throws javax.security.auth.login.LoginException
Add relevant Principals to the subject.

Specified by:
commit in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException

initialize

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

login

public boolean login()
              throws javax.security.auth.login.LoginException
Prompt the user for username and password, and verify those.

Specified by:
login in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException

logout

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

getTopicMap

protected TopicMapIF getTopicMap()

hashPassword

public static java.lang.String hashPassword(java.lang.String username,
                                            java.lang.String password,
                                            java.lang.String hashMethod)


Copyright © 2000-2012 Ontopia.