public class AuthInterfaceAdaptor extends Object implements AuthInterface
| Constructor and Description |
|---|
AuthInterfaceAdaptor() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
changePassword(Long uoid,
String oldPassword,
String newPassword)
Change a User's password, not the preferred way, use requestPasswordChange for a safer version
|
SAccessMethod |
getAccessMethod() |
SUser |
getLoggedInUser() |
Boolean |
isLoggedIn()
Check whether the server considers the user (token) as logged-in
|
String |
login(String username,
String password)
Login with a username/password combination
|
String |
loginUserToken(String token)
Login with a user-token
|
void |
logout()
Logout
|
void |
requestPasswordChange(String username,
String resetUrl,
Boolean includeSiteAddress)
Request a password change, an e-mail will be send with a validation url
|
void |
setHash(Long uoid,
byte[] hash,
byte[] salt)
Change a User's password, not the preferred way, use requestPasswordChange for a safer version
|
SUser |
validateAccount(Long uoid,
String token,
String password) |
public Boolean changePassword(Long uoid, String oldPassword, String newPassword) throws UserException, ServerException
AuthInterfacechangePassword in interface AuthInterfaceuoid - The ObjectID of the UseroldPassword - The old passwordnewPassword - The new passwordUserExceptionServerExceptionpublic SAccessMethod getAccessMethod() throws UserException, ServerException
getAccessMethod in interface AuthInterfaceUserExceptionServerExceptionpublic SUser getLoggedInUser() throws UserException, ServerException
getLoggedInUser in interface AuthInterfaceUserExceptionServerExceptionpublic Boolean isLoggedIn() throws UserException, ServerException
AuthInterfaceisLoggedIn in interface AuthInterfaceUserExceptionServerExceptionpublic String login(String username, String password) throws UserException, ServerException
AuthInterfacelogin in interface AuthInterfaceusername - The username (must be a valid e-mail address)password - The passwordUserExceptionServerExceptionpublic String loginUserToken(String token) throws UserException, ServerException
AuthInterfaceloginUserToken in interface AuthInterfaceUserExceptionServerExceptionpublic void logout()
throws UserException,
ServerException
AuthInterfacelogout in interface AuthInterfaceUserExceptionServerExceptionpublic void requestPasswordChange(String username, String resetUrl, Boolean includeSiteAddress) throws UserException, ServerException
AuthInterfacerequestPasswordChange in interface AuthInterfaceusername - The username of the user to change tot password forUserExceptionServerExceptionpublic void setHash(Long uoid, byte[] hash, byte[] salt) throws UserException, ServerException
AuthInterfacesetHash in interface AuthInterfaceuoid - The ObjectID of the UserUserExceptionServerExceptionpublic SUser validateAccount(Long uoid, String token, String password) throws UserException, ServerException
validateAccount in interface AuthInterfaceuoid - The ObejctID of the Usertoken - The token generated by requestPasswordChangepassword - The new passwordUserExceptionServerExceptionCopyright © 2018 OpenSource BIM. All rights reserved.