com.maverick.sshd.platform
Interface NativeAuthenticationProvider


public interface NativeAuthenticationProvider

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

Method Summary
 boolean changePassword(byte[] sessionid, java.lang.String username, java.lang.String oldpassword, java.lang.String newpassword)
          Implement this method to change the users password
 int getAuthenticationStatus()
           
 java.lang.String getHomeDirectory(byte[] sessionid, java.lang.String username)
          Implement this method to return the actual location of the users home directory.
 java.lang.String getUserGroup(byte[] sessionid, java.lang.String username)
          Implement this method to return the users group.
 void logoffUser(byte[] sessionid, java.lang.String username, java.net.SocketAddress ipAddress)
          Logoff the user.
 boolean logonUser(byte[] sessionid, java.lang.String username, java.net.SocketAddress ipAddress)
          This method performs a trusted logon; this method should only be called when the user has been authenticated.
 boolean logonUser(byte[] sessionid, java.lang.String username, java.net.SocketAddress ipAddress, SshPublicKey key, boolean verifyOnly)
          This method performs a trusted logon; this method should only be called when the user has been authenticated.
 boolean logonUser(byte[] sessionid, java.lang.String username, java.lang.String password, java.net.SocketAddress ipAddress)
          Implement this method to log the user into the system.
 

Method Detail

getAuthenticationStatus

int getAuthenticationStatus()

logonUser

boolean logonUser(byte[] sessionid,
                  java.lang.String username,
                  java.lang.String password,
                  java.net.SocketAddress ipAddress)
                  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.

logonUser

boolean logonUser(byte[] sessionid,
                  java.lang.String username,
                  java.net.SocketAddress ipAddress)
This method performs a trusted logon; this method should only be called when the user has been authenticated. This provides the ability to login a user through public key or some other authentication mechanism that does not rely on passwords.

Parameters:
sessionid -
username -
ipAddress -
Returns:
boolean

logonUser

boolean logonUser(byte[] sessionid,
                  java.lang.String username,
                  java.net.SocketAddress ipAddress,
                  SshPublicKey key,
                  boolean verifyOnly)
This method performs a trusted logon; this method should only be called when the user has been authenticated. This provides the ability to login a user through public key or some other authentication mechanism that does not rely on passwords.

Parameters:
sessionid -
username -
ipAddress -
Returns:
boolean

logoffUser

void logoffUser(byte[] sessionid,
                java.lang.String username,
                java.net.SocketAddress ipAddress)
Logoff the user.

Parameters:
sessionid -
username -
ipAddress -

getHomeDirectory

java.lang.String getHomeDirectory(byte[] sessionid,
                                  java.lang.String username)
Implement this method to return the actual location of the users home directory. This is the physical location on the server.

Parameters:
sessionid -
username -
Returns:
String

changePassword

boolean changePassword(byte[] sessionid,
                       java.lang.String username,
                       java.lang.String oldpassword,
                       java.lang.String newpassword)
                       throws PasswordChangeException
Implement this method to change the users password

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

getUserGroup

java.lang.String getUserGroup(byte[] sessionid,
                              java.lang.String username)
                              throws java.io.IOException
Implement this method to return the users group.

Parameters:
sessionid -
username -
Returns:
String
Throws:
java.io.IOException


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.