com.maverick.sshd.auth.jaas
Class AbstractJAASAuthenticationProvider

java.lang.Object
  extended by com.maverick.sshd.PasswordAuthenticationProvider
      extended by com.maverick.sshd.auth.jaas.AbstractJAASAuthenticationProvider
All Implemented Interfaces:
AuthenticationProvider
Direct Known Subclasses:
FileAuthenticationProvider, SunJAASFileConfigurationAuthenticationProvider

public abstract class AbstractJAASAuthenticationProvider
extends PasswordAuthenticationProvider

An authentication provider that uses JAAS for native authentication


Field Summary
protected  List<Connection> connections
           
static String LOGIN_CONTEXT
           
protected  Map<String,LoginContext> logins
           
 
Constructor Summary
AbstractJAASAuthenticationProvider()
           
 
Method Summary
 boolean changePassword(Connection con, String username, String oldpassword, String newpassword)
          Implement this method to change the users password
 List<Connection> getConnections()
           
abstract  Configuration getJAASConfiguration()
           
 LoginContext getLoginContext(String con)
           
 boolean verifyPassword(Connection con, String username, String password)
          Implement this method to log the user into the system.
 
Methods inherited from class com.maverick.sshd.PasswordAuthenticationProvider
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logins

protected final Map<String,LoginContext> logins

connections

protected final List<Connection> connections

LOGIN_CONTEXT

public static final String LOGIN_CONTEXT
See Also:
Constant Field Values
Constructor Detail

AbstractJAASAuthenticationProvider

public AbstractJAASAuthenticationProvider()
Method Detail

getLoginContext

public LoginContext getLoginContext(String con)

changePassword

public boolean changePassword(Connection con,
                              String username,
                              String oldpassword,
                              String newpassword)
Description copied from class: PasswordAuthenticationProvider
Implement this method to change the users password

Specified by:
changePassword in class PasswordAuthenticationProvider
Returns:
boolean

getJAASConfiguration

public abstract Configuration getJAASConfiguration()

verifyPassword

public boolean verifyPassword(Connection con,
                              String username,
                              String password)
                       throws PasswordChangeException
Description copied from class: PasswordAuthenticationProvider
Implement this method to log the user into the system.

Specified by:
verifyPassword in class PasswordAuthenticationProvider
Returns:
boolean
Throws:
PasswordChangeException - throw this exception if the users password requires a changing.

getConnections

public List<Connection> getConnections()


Copyright © 2012. All Rights Reserved.