org.abstracthorizon.danube.auth.jaas.memory
Class PropertiesLoginModule

java.lang.Object
  extended by org.abstracthorizon.danube.auth.jaas.memory.PropertiesLoginModule
All Implemented Interfaces:
LoginModule

public class PropertiesLoginModule
extends Object
implements LoginModule

This is keystore login module. This login module checks keystore's certificates

Author:
Daniel Sendula

Field Summary
protected static int AUTHENTICATED
          User authenticated state
protected  CallbackHandler callbackHandler
          Callback handler
protected static int INITIALIZED
          Initialised state
protected static int LOGGED_IN
          Logged in state
protected  org.slf4j.Logger logger
          Logger
protected  Map<String,?> options
           
protected  Map<String,?> sharedState
           
protected  int status
          Current state defaulted to uninitialised
protected  Subject subject
          Subject
protected static int UNINITIALIZED
          Uninitialised state
protected  String username
          Username
 
Constructor Summary
PropertiesLoginModule()
          Default contructor
 
Method Summary
 boolean abort()
          Aborts login
 boolean commit()
          Performs commit
 Properties getProperties()
           
 void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
          Init method
 boolean login()
          Login method
 boolean logout()
          Logs out
 void setProperties(Properties properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.slf4j.Logger logger
Logger


subject

protected Subject subject
Subject


callbackHandler

protected CallbackHandler callbackHandler
Callback handler


sharedState

protected Map<String,?> sharedState

options

protected Map<String,?> options

username

protected String username
Username


UNINITIALIZED

protected static final int UNINITIALIZED
Uninitialised state

See Also:
Constant Field Values

INITIALIZED

protected static final int INITIALIZED
Initialised state

See Also:
Constant Field Values

AUTHENTICATED

protected static final int AUTHENTICATED
User authenticated state

See Also:
Constant Field Values

LOGGED_IN

protected static final int LOGGED_IN
Logged in state

See Also:
Constant Field Values

status

protected int status
Current state defaulted to uninitialised

Constructor Detail

PropertiesLoginModule

public PropertiesLoginModule()
Default contructor

Method Detail

setProperties

public void setProperties(Properties properties)

getProperties

public Properties getProperties()

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map<String,?> sharedState,
                       Map<String,?> options)
Init method

Specified by:
initialize in interface LoginModule
Parameters:
subject - subject
callbackHandler - handler
sharedState - shared state
options - options

login

public boolean login()
              throws LoginException
Login method

Specified by:
login in interface LoginModule
Returns:
true if successful
Throws:
LoginException

commit

public boolean commit()
               throws LoginException
Performs commit

Specified by:
commit in interface LoginModule
Returns:
true if successful
Throws:
LoginException

abort

public boolean abort()
              throws LoginException
Aborts login

Specified by:
abort in interface LoginModule
Returns:
true if successful
Throws:
LoginException

logout

public boolean logout()
               throws LoginException
Logs out

Specified by:
logout in interface LoginModule
Returns:
true if successful
Throws:
LoginException


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.