jet.server.api
Interface Authenticator


public interface Authenticator

This interface provides methods to authenticate valid users and actions.


Method Summary
 java.lang.String changePassword(java.lang.String realm, java.lang.String byUserID, java.lang.String userID, java.lang.String password, java.lang.String newPassword)
          Change the password of an user.
 boolean checkPrivilege(java.lang.String realm, java.lang.String userID, java.lang.String privilege)
          Test if the user has the privilege
 boolean isPermissionOk(java.lang.String realm, java.lang.String userID, java.lang.String resource, int versionNumber, java.lang.String action)
          Test if the user has the permission of the action for the resource in the server.
 boolean isPermissionOk(java.lang.String realm, java.lang.String userID, java.lang.String resource, java.lang.String action)
          Test if the user has the permission of the action for the resource in the server.
 boolean isValidAdminUser(java.lang.String realm, java.lang.String userID, java.lang.String password)
          Test if the user is valid admin user.
 boolean isValidUser(java.lang.String realm, java.lang.String userID, java.lang.String password)
          Test if the user is valid.
 

Method Detail

isValidUser

boolean isValidUser(java.lang.String realm,
                    java.lang.String userID,
                    java.lang.String password)
Test if the user is valid.

Parameters:
realm - the realm.
userID - the user ID.
password - the password.
Returns:
if the user is valid.

isValidAdminUser

boolean isValidAdminUser(java.lang.String realm,
                         java.lang.String userID,
                         java.lang.String password)
Test if the user is valid admin user.

Parameters:
realm - the realm.
userID - the user ID.
password - the password.
Returns:
if the user is valid.

isPermissionOk

boolean isPermissionOk(java.lang.String realm,
                       java.lang.String userID,
                       java.lang.String resource,
                       java.lang.String action)
Test if the user has the permission of the action for the resource in the server.

Parameters:
realm - the realm.
userID - the user ID.
resource - the resource in the server. For example: /SunVMDemo/SunVMDemo.cat.
action - the action for the resource in the server. For example: APIConst.CMD_WEB_VIEW.
Returns:
if the user has the permission of the action for the resource in the server.

isPermissionOk

boolean isPermissionOk(java.lang.String realm,
                       java.lang.String userID,
                       java.lang.String resource,
                       int versionNumber,
                       java.lang.String action)
Test if the user has the permission of the action for the resource in the server.

Parameters:
realm - the realm.
userID - the user ID.
resource - the resource in the server. For example: /SunVMDemo/SunVMDemo.cat.
versionNumber - the version number of resource to specify which version will be checked
action - the action for the resource in the server. For example: APIConst.CMD_WEB_VIEW.
Returns:
if the user has the permission of the action for the resource in the server.

checkPrivilege

boolean checkPrivilege(java.lang.String realm,
                       java.lang.String userID,
                       java.lang.String privilege)
Test if the user has the privilege

Parameters:
realm - the realm
userID - the user ID.
privilege - the privilege string, the available privileges are: APIConst.PRIVILEGE_CREATE_ANALYSIS_REPORT, APIConst.PRIVILEGE_PUBLISH_REPORT, APIConst.PRIVILEGE_ACCESS_ADVANCED_PROPERTIES
Returns:
true if the user has the privilege

changePassword

java.lang.String changePassword(java.lang.String realm,
                                java.lang.String byUserID,
                                java.lang.String userID,
                                java.lang.String password,
                                java.lang.String newPassword)
Change the password of an user.

Parameters:
realm - the realm.
byUserID - change by the user ID.
userID - the user ID whose password will be changed.
password - the password whose byUserID.
newPassword - the new password.
Returns:
the error message, or null if no error.