com.droplets.api
Interface UserManagerAuthenticator


public interface UserManagerAuthenticator

This is the interface that Java user manager classes must implement to support the authentication interface that receives a user name as well as a password. The implementation of the authenticate method should return whether or not the application/user/password/context combination is valid.

If your class implements this interface then it will take precedence over the UserManager and UserManager2 interfaces.

In addition to the function in this interface, implementing classes must declare a default constructor.


Field Summary
static int AUTH_FAILURE_PASSWORD_INVALID
          Constant denoting that authentication failed due to an invalid password.
static int AUTH_FAILURE_UNKNOWN
          Constant denoting that authentication failed due to an unspecified error.
static int AUTH_FAILURE_USER_INVALID
          Constant denoting that authentication failed due to an invalid user name.
static int AUTH_SUCCESS
          Constant denoting that authentication was a success.
 
Method Summary
 int authenticate(java.lang.String appName, java.lang.String userName, java.lang.String password, java.lang.String context, VariableMap connectionVariables)
          Determines if the application/user/password/context combination is correct for the given user in the given application.
 

Field Detail

AUTH_FAILURE_PASSWORD_INVALID

public static final int AUTH_FAILURE_PASSWORD_INVALID
Constant denoting that authentication failed due to an invalid password.

AUTH_FAILURE_USER_INVALID

public static final int AUTH_FAILURE_USER_INVALID
Constant denoting that authentication failed due to an invalid user name.

AUTH_FAILURE_UNKNOWN

public static final int AUTH_FAILURE_UNKNOWN
Constant denoting that authentication failed due to an unspecified error.

AUTH_SUCCESS

public static final int AUTH_SUCCESS
Constant denoting that authentication was a success.
Method Detail

authenticate

public int authenticate(java.lang.String appName,
                        java.lang.String userName,
                        java.lang.String password,
                        java.lang.String context,
                        VariableMap connectionVariables)
                 throws java.lang.Exception
Determines if the application/user/password/context combination is correct for the given user in the given application. This function should return one of the constants defined in this class.

See the Droplets User Manager documentation for more information on how to implement this method.

Parameters:
appName - the name of the Droplet application the user is requesting
userName - the username the user entered in the authentication dialog box
password - the password the user entered in the authentication dialog box
context - the context the user selected in the authentication dialog box
connectionVariables - the parameters of the connection. This is the same as those available via Application.getVariableValue():
Returns:
a constant stating if the password is valid for this user, on this system, with this context.
Throws:
java.lang.Exception - any exception thrown is caught and logged by the Droplet Server
See Also:
Application.getVariableValue(java.lang.String)


Copyright © Droplets, 2001. All Rights Reserved.