public interface UserManager
| Modifier and Type | Interface and Description |
|---|---|
static class |
UserManager.AuthType |
static class |
UserManager.UpdateField |
static class |
UserManager.UserJoinStatus
Specifies the state of a user based on their login name
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HIDE_PASSWORD |
static java.lang.String |
INVALID_CREDENTIALS_MSG |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationData |
authenticate(java.lang.String loginName,
java.lang.String password,
boolean rememberMe)
Authenticates the provided credentials in the context of the current partner reference
|
void |
changePassword(XInfo xinfo,
java.lang.String newPassword) |
User |
findByLogin(java.lang.String loginName)
Returns the User with the provided login name in the context of the current partner reference.
|
User |
findByLogin(java.lang.String partnerRef,
java.lang.String loginName)
Returns the User with the provided login name in the context of a partner reference.
|
java.util.List<java.lang.String> |
findJoinedApplications(java.lang.String loginName)
Returns the list of partner references a user has joined.
|
Pair<UserManager.UserJoinStatus,User> |
getJoinedStatus(java.lang.String loginName)
Returns whether a user exists and if so whether the user belongs to the current
partner reference
|
Pair<UserManager.UserJoinStatus,User> |
getJoinedStatus(java.lang.String partnerRef,
java.lang.String loginName) |
User |
getUser(java.lang.String accessToken)
Returns the User associated with an access token.
|
User |
getUser(XInfo xinfo)
Returns the User represented by the specified external reference information in the
context of the current partner reference.
|
User |
joinApplication()
Connects the currently authenticated user with the running partner application or service.
|
User |
joinApplication(java.lang.String loginName,
java.lang.String password)
Connects a user with the running partner application or service.
|
User |
joinApplication(java.lang.String partnerRef,
java.lang.String loginName,
java.lang.String password)
Connects a user with the specified partner application or service.
|
User |
leaveApplication()
Disconnects the currently authenticated user with the running partner application or service.
|
User |
leaveApplication(java.lang.String loginName,
java.lang.String password) |
User |
leaveApplication(java.lang.String partnerRef,
java.lang.String loginName,
java.lang.String password) |
void |
logout() |
User |
persist(UserBuilder ub)
Persists a
User object, creating an external reference linking the user to the current partner reference. |
User |
persist(UserBuilder ub,
java.util.UUID reservation)
Persists a
User object, creating an external reference linking the user to the current partner reference. |
java.util.UUID |
reserveLoginName(java.lang.String loginName)
Returns whether a login name is already in use.
|
void |
update(XInfo xInfo,
java.util.List<Pair<UserManager.UpdateField,java.lang.Object>> values) |
static final java.lang.String HIDE_PASSWORD
static final java.lang.String INVALID_CREDENTIALS_MSG
java.util.UUID reserveLoginName(java.lang.String loginName)
throws AlreadyExistsException
If the name is available, reserves the name for ReservedNameList.RESERVE_SECONDS_DEFAULT
seconds.
loginName - Login name to check.AlreadyExistsException - loginName is already in use or reserved.User joinApplication() throws NotFoundException, AuthenticationException
NotFoundExceptionAuthenticationExceptionUser leaveApplication() throws NotFoundException, AuthenticationException
NotFoundExceptionAuthenticationExceptionUser joinApplication(java.lang.String loginName, java.lang.String password) throws NotFoundException, AuthenticationException, AlreadyExistsException, java.lang.IllegalArgumentException
loginName - User's login namepassword - User's passwordNotFoundExceptionAuthenticationExceptionAlreadyExistsExceptionjava.lang.IllegalArgumentExceptionInvalidPartnerExceptionUser leaveApplication(java.lang.String loginName, java.lang.String password) throws NotFoundException, AuthenticationException, AlreadyExistsException, java.lang.IllegalArgumentException
NotFoundExceptionAuthenticationExceptionAlreadyExistsExceptionjava.lang.IllegalArgumentExceptionUser joinApplication(java.lang.String partnerRef, java.lang.String loginName, java.lang.String password) throws NotFoundException, AuthenticationException, AlreadyExistsException, java.lang.IllegalArgumentException
Note: For use only by Service Administrators.
appRef - Partner referenceloginName - User's login namepassword - User's passwordNotFoundExceptionAuthenticationExceptionAlreadyExistsExceptionjava.lang.IllegalArgumentExceptionInvalidPartnerExceptionUser leaveApplication(java.lang.String partnerRef, java.lang.String loginName, java.lang.String password) throws NotFoundException, AuthenticationException, AlreadyExistsException, java.lang.IllegalArgumentException
NotFoundExceptionAuthenticationExceptionAlreadyExistsExceptionjava.lang.IllegalArgumentExceptionUser persist(UserBuilder ub) throws AlreadyExistsException, NotFoundException
User object, creating an external reference linking the user to the current partner reference.ub - Contains the data necessary for creating a new user.
The minimal data necessary:
AlreadyExistsExceptionInvalidPartnerExceptionNotFoundExceptionUser persist(UserBuilder ub, java.util.UUID reservation) throws AlreadyExistsException, NotFoundException
User object, creating an external reference linking the user to the current partner reference.ub - Contains the data necessary for creating a new user. See persist(UserBuilder).reservation - A reservation for a login name returned from reserveLoginName(String).AlreadyExistsExceptionInvalidPartnerExceptionNotFoundExceptionAuthenticationData authenticate(java.lang.String loginName, java.lang.String password, boolean rememberMe) throws AuthenticationException, java.lang.IllegalArgumentException, NotFoundException
loginName - User's login namepassword - User's passwordrememberMe - true when applicable, create a cookie for this user; otherwise falseAuthenticationExceptionjava.lang.IllegalArgumentExceptionNotFoundExceptionInvalidPartnerExceptionUser getUser(XInfo xinfo) throws NotFoundException
xinfo - External reference informationNotFoundExceptionInvalidPartnerExceptionUser getUser(java.lang.String accessToken) throws NotFoundException
accessToken - Access tokenNotFoundException - If the access token does not exist.User findByLogin(java.lang.String loginName) throws NotFoundException
loginName - The user's login nameNotFoundException - No user is found with that login name.User findByLogin(java.lang.String partnerRef, java.lang.String loginName) throws NotFoundException
Note: For use only by Service Administrators.
partnerRef - Partner referenceloginName - The user's login nameNotFoundException - No user is found with that login name.InvalidPartnerExceptionjava.util.List<java.lang.String> findJoinedApplications(java.lang.String loginName)
throws NotFoundException
loginName - User's login nameNotFoundExceptionPair<UserManager.UserJoinStatus,User> getJoinedStatus(java.lang.String loginName)
loginName - User's login namePair<UserManager.UserJoinStatus,User> getJoinedStatus(java.lang.String partnerRef, java.lang.String loginName)
void update(XInfo xInfo, java.util.List<Pair<UserManager.UpdateField,java.lang.Object>> values) throws ForbiddenException, NotFoundException
ForbiddenExceptionNotFoundExceptionvoid changePassword(XInfo xinfo, java.lang.String newPassword) throws NotFoundException
NotFoundExceptionvoid logout()