public interface UserAuthenticator
JReport Enterprise Server provides the ability to use customized user authentication scheme.
A customized user authentication scheme must implement the interface
jet.server.UserAuthenticator, and import the customized class file by
modifying the following JReport Enterprise Server's properties file:
<SERVER PATH>/bin/classes.properties
When using customized user authentication scheme, user should:
1. Write a class which implements the interface
jet.server.UserAuthenticator.
2. Put the class into CLASSPATH which used by launching JReport Enterprise Server
3. Edit file <SERVER PATH>/bin/classes.properties, let name
UserAuthenticator point to the customized class
4. Restart JReport Enterprise Server and the customized user authentication is working.
| Modifier and Type | Method and Description |
|---|---|
String |
changePassword(String realmName,
String implUserName,
String userName,
String oldPwd,
String newPwd)
Changes user password.
|
String |
changePasswordEx(String realmName,
String implUserName,
String userName,
String oldPwd,
String newPwd)
Changes user password.
|
boolean |
getAuditState(String realmName,
String userName,
int type,
boolean success)
Gets the audit state setting.
|
UserMailList |
getMailList()
Gets the user mail list.
|
String |
getPassword(String realmName,
String userName)
Gets the user password
|
Enumeration |
getRealmNames()
Gets the realm list.
|
Enumeration |
getUserNames(String realmName)
Gets the user names in the realm.
|
boolean |
isPermissionOk(String realmName,
String userName,
String uri,
int versionNumber,
String cmd)
Checks if the user has the permission to do the action on a specific version of resource
|
boolean |
isPermissionOk(String realmName,
String userName,
String uri,
String cmd)
Checks if the user has the permission to do the action
|
boolean |
isValidAdminUser(String realmName,
String userName,
String password)
Checks if the user can access the administration tools.
|
boolean |
isValidUser(String realmName,
String userName,
String password)
Checks if the user is a valid one.
|
static final int ACCESS
static final int MANAGE
String changePassword(String realmName, String implUserName, String userName, String oldPwd, String newPwd)
realmName - the realm nameimplUserName - the user name who invoked the actionuserName - the user name whose password needs to be changedoldPwd - the old passwordnewPwd - the new passwordString changePasswordEx(String realmName, String implUserName, String userName, String oldPwd, String newPwd) throws InvalidPasswordException
realmName - the realm nameimplUserName - the user name who invoked the actionuserName - the user name whose password needs to be changedoldPwd - the old passwordnewPwd - the new passwordInvalidPasswordException - if password not match advanced password ruleboolean isPermissionOk(String realmName, String userName, String uri, String cmd)
realmName - the realm nameuserName - the user nameuri - the request URI
the uri equals a special string APIConst.PRIVILEGE_URI which means this method is used to
check privileges.
For example, if this method is used to check privileges, it will be invoked as:
isPermissionOk(realmName, userName, APIConst.PRIVILEGE_URI, cmd);cmd - the action needed to be invoked. see brsow2cmd.htm
for detailed informationboolean isPermissionOk(String realmName, String userName, String uri, int versionNumber, String cmd)
realmName - the realm nameuserName - the user nameuri - the request URIversionNumber - version number of the resource specified by URIcmd - the action needed to be invoked. see brsow2cmd.htm
for detailed informationboolean isValidUser(String realmName, String userName, String password)
realmName - the realm nameuserName - the user namepassword - the user passwordboolean isValidAdminUser(String realmName, String userName, String password)
realmName - the realm nameuserName - the user namepassword - the user passwordString getPassword(String realmName, String userName)
realmName - the realm nameuserName - the user nameEnumeration getRealmNames()
String.Enumeration getUserNames(String realmName)
realmName - the realm nameString.boolean getAuditState(String realmName, String userName, int type, boolean success)
realmName - the realm nameuserName - the user nametype - the target type, which must be one of the constants defined abovesuccess - denotes whether audit succeeded or failedUserMailList getMailList()
UserMailList© insightsoftware. All rights reserved.