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)
          Changes the password of a user.
 java.lang.String changePasswordEx(java.lang.String realm, java.lang.String byUserID, java.lang.String userID, java.lang.String password, java.lang.String newPassword)
          Changes the password of a user.
 boolean checkPrivilege(java.lang.String realm, java.lang.String userID, java.lang.String privilege)
          Checks if the user has the privilege.
 boolean isAdminUser(java.lang.String realm, java.lang.String userID)
           
 boolean isOrganizationAdminUser(java.lang.String realm, java.lang.String userID)
           
 boolean isPermissionOk(java.lang.String realm, java.lang.String userID, java.lang.String resource, int versionNumber, java.lang.String action)
          Checks if the user has the permission of the action on the resource in the server.
 boolean isPermissionOk(java.lang.String realm, java.lang.String userID, java.lang.String resource, java.lang.String action)
          Checks if the user has the permission of the action on the resource in the server.
 boolean isValidAdminUser(java.lang.String realm, java.lang.String userID, java.lang.String password)
          Checks if the user is valid admin user.
 boolean isValidAdminUserEx(java.lang.String realm, java.lang.String userID, java.lang.String password)
          Checks if the user is valid admin user.
 boolean isValidOrganizationAdminUser(java.lang.String realm, java.lang.String userID, java.lang.String password)
          Checks if the user is valid admin user of an organization.
 boolean isValidUser(java.lang.String realm, java.lang.String userID, java.lang.String password)
          Checks if the user is valid.
 boolean isValidUserEx(java.lang.String realm, java.lang.String userID, java.lang.String password)
          Checks if the user is valid.
 

Method Detail

isValidUser

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

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

isValidUserEx

boolean isValidUserEx(java.lang.String realm,
                      java.lang.String userID,
                      java.lang.String password)
                      throws InvalidUserException
Checks if the user is valid.

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

isValidAdminUser

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

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

isValidAdminUserEx

boolean isValidAdminUserEx(java.lang.String realm,
                           java.lang.String userID,
                           java.lang.String password)
                           throws InvalidUserException
Checks if the user is valid admin user.

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

isAdminUser

boolean isAdminUser(java.lang.String realm,
                    java.lang.String userID)

isValidOrganizationAdminUser

boolean isValidOrganizationAdminUser(java.lang.String realm,
                                     java.lang.String userID,
                                     java.lang.String password)
Checks if the user is valid admin user of an organization.

Parameters:
realm - the realm.
userID - the user ID, organization name and user name is separated by "\".
password - the password.
Returns:
if the user is valid.
Since:
version 13

isOrganizationAdminUser

boolean isOrganizationAdminUser(java.lang.String realm,
                                java.lang.String userID)

isPermissionOk

boolean isPermissionOk(java.lang.String realm,
                       java.lang.String userID,
                       java.lang.String resource,
                       java.lang.String action)
Checks if the user has the permission of the action on 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 on 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)
Checks if the user has the permission of the action on 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 which will be checked.
action - the action o the resource in the server, for example: APIConst.CMD_WEB_VIEW.
Returns:
if the user has the permission of the action on the resource in the server.

checkPrivilege

boolean checkPrivilege(java.lang.String realm,
                       java.lang.String userID,
                       java.lang.String privilege)
Checks 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)
Changes the password of a user.

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

changePasswordEx

java.lang.String changePasswordEx(java.lang.String realm,
                                  java.lang.String byUserID,
                                  java.lang.String userID,
                                  java.lang.String password,
                                  java.lang.String newPassword)
                                  throws InvalidPasswordException
Changes the password of a user.

Parameters:
realm - the realm.
byUserID - changes by the user ID.
userID - the user ID whose password will be changed.
password - the password byUserID.
newPassword - the new password.
Returns:
the error message, or null if no error.
Throws:
InvalidPasswordException - if password not match advanced password rule