Package com.sshtools.common.auth
Class PasswordAuthenticationProvider
java.lang.Object
com.sshtools.common.auth.PasswordAuthenticationProvider
- All Implemented Interfaces:
Authenticator
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanchangePassword(SshConnection con, String username, String oldpassword, String newpassword) Implement this method to change the users passwordgetName()abstract booleanverifyPassword(SshConnection con, String username, String password) Implement this method to log the user into the system.
-
Constructor Details
-
PasswordAuthenticationProvider
public PasswordAuthenticationProvider()
-
-
Method Details
-
getName
-
verifyPassword
public abstract boolean verifyPassword(SshConnection con, String username, String password) throws PasswordChangeException, IOException 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.IOException
-
changePassword
public abstract boolean changePassword(SshConnection con, String username, String oldpassword, String newpassword) throws PasswordChangeException, IOException Implement this method to change the users password- Parameters:
sessionid-username-oldpassword-newpassword-- Returns:
- boolean
- Throws:
PasswordChangeExceptionIOException
-