org.abstracthorizon.extend.server.auth.jaas.keystore
Class KeyStoreLoginModule

java.lang.Object
  extended by org.abstracthorizon.extend.server.auth.jaas.keystore.KeyStoreLoginModule
All Implemented Interfaces:
LoginModule

public class KeyStoreLoginModule
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
KeyStoreLoginModule()
          Default contructor
 
Method Summary
 boolean abort()
          Aborts login
 boolean commit()
          Performs commit
 String getKeystoreURL()
          Returns keystore URL
 void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
          Init method
 boolean login()
          Login method
 boolean logout()
          Logs out
 void setKeystorePassword(String password)
          Sets keystore password
 void setKeystoreURL(String url)
          Sets keystore URL
 
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

KeyStoreLoginModule

public KeyStoreLoginModule()
Default contructor

Method Detail

setKeystorePassword

public void setKeystorePassword(String password)
Sets keystore password

Parameters:
password - keystore password

setKeystoreURL

public void setKeystoreURL(String url)
Sets keystore URL

Parameters:
url - keystore URL

getKeystoreURL

public String getKeystoreURL()
Returns keystore URL

Returns:
keystore URL

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.