private class ReportProtocol.Services
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static int |
MSG_AUTH
Authentication message type
|
private static int |
MSG_CHANGE_PASS
Request to change password
|
private static int |
MSG_CLOSE
Session close message type
|
| Constructor and Description |
|---|
Services()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean[] |
authenticate(java.lang.String name,
java.lang.String pass)
Authenticate a user's credentials and log into a new session.
|
void |
changePassword(java.lang.String name,
java.lang.String oldPass,
java.lang.String newPass1,
java.lang.String newPass2)
Change the given user's password, first authenticating with the old password.
|
void |
closeNormally()
Close the session normally, performing any session-specific protocol cleanup needed.
|
private static final int MSG_AUTH
private static final int MSG_CLOSE
private static final int MSG_CHANGE_PASS
public boolean[] authenticate(java.lang.String name,
java.lang.String pass)
name - User namepass - User passwordTrue if user has admin rights, else false.True if user's password has expired, else false.java.lang.RuntimeException - if there was an error authenticating.public void changePassword(java.lang.String name,
java.lang.String oldPass,
java.lang.String newPass1,
java.lang.String newPass2)
name - User name.oldPass - Existing password with which to authenticate request.newPass1 - New password.newPass2 - New password (for verification; should be the same as newPass1.java.lang.RuntimeException - if the old or new passwords were not valid or if there was an encryption or
database problem.public void closeNormally()