com.maverick.sshd
Class PasswordAuthenticationProvider

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

public abstract class PasswordAuthenticationProvider
extends Object
implements AuthenticationProvider

Implement this interface to customize the authentication of users logging into your server. To install your provider you must configure the servers ConfigurationContext within the servers configure method.

This interface has been updated to include session id in all method calls to make it more consistent.

Author:
Lee David Painter

Constructor Summary
PasswordAuthenticationProvider()
           
 
Method Summary
abstract  boolean changePassword(Connection con, String username, String oldpassword, String newpassword)
          Implement this method to change the users password
 String getName()
           
abstract  boolean verifyPassword(Connection con, String username, String password)
          Implement this method to log the user into the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordAuthenticationProvider

public PasswordAuthenticationProvider()
Method Detail

getName

public String getName()

verifyPassword

public abstract boolean verifyPassword(Connection con,
                                       String username,
                                       String password)
                                throws PasswordChangeException
Implement this method to log the user into the system.

Parameters:
sessionid -
username -
password -
ipAddress -
Returns:
boolean
Throws:
PasswordChangeException - throw this exception if the users password requires a changing.

changePassword

public abstract boolean changePassword(Connection con,
                                       String username,
                                       String oldpassword,
                                       String newpassword)
                                throws PasswordChangeException
Implement this method to change the users password

Parameters:
sessionid -
username -
oldpassword -
newpassword -
Returns:
boolean
Throws:
PasswordChangeException


Copyright © 2012. All Rights Reserved.