Class IdUClient
java.lang.Object
com.io7m.idstore.user_client.internal.IdUClient
- All Implemented Interfaces:
IdUClientType,IdUClientUsersType,Closeable,AutoCloseable
The default client implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionIdUClient(Locale inLocale, IdUStrings inStrings, HttpClient inHttpClient, IdUClientProtocolHandlerType inHandler) The default client implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Log in.voiduserEmailAddBegin(IdEmail email) Start adding the given email address to the current user.voiduserEmailAddDeny(IdToken token) Reject a challenge that adds an email address to the given user.voiduserEmailAddPermit(IdToken token) Complete a challenge that adds an email address to the given user.voiduserEmailRemoveBegin(IdEmail email) Start removing the given email address to the current user.voiduserEmailRemoveDeny(IdToken token) Reject a challenge that removes an email address to the given user.voiduserEmailRemovePermit(IdToken token) Complete a challenge that removes an email address to the given user.voiduserPasswordUpdate(String password, String passwordConfirm) Update the user's password.voiduserRealNameUpdate(IdRealName realName) Update the user's realname.userSelf()Retrieve the current user profile.
-
Constructor Details
-
IdUClient
public IdUClient(Locale inLocale, IdUStrings inStrings, HttpClient inHttpClient, IdUClientProtocolHandlerType inHandler) The default client implementation.- Parameters:
inLocale- The localeinStrings- The string resourcesinHttpClient- The HTTP clientinHandler- The versioned handler
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
login
public IdUser login(String user, String password, URI base, Map<String, String> metadata) throws IdUClientException, InterruptedExceptionDescription copied from interface:IdUClientTypeLog in.- Specified by:
loginin interfaceIdUClientType- Parameters:
user- The admin usernamepassword- The passwordbase- The base URImetadata- Optional metadata to be included with the request- Returns:
- The logged-in user
- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userSelf
Description copied from interface:IdUClientUsersTypeRetrieve the current user profile.- Specified by:
userSelfin interfaceIdUClientUsersType- Returns:
- The current user
- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userEmailAddBegin
Description copied from interface:IdUClientUsersTypeStart adding the given email address to the current user.- Specified by:
userEmailAddBeginin interfaceIdUClientUsersType- Parameters:
email- The email address- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userEmailAddPermit
Description copied from interface:IdUClientUsersTypeComplete a challenge that adds an email address to the given user.- Specified by:
userEmailAddPermitin interfaceIdUClientUsersType- Parameters:
token- The challenge token- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userEmailAddDeny
Description copied from interface:IdUClientUsersTypeReject a challenge that adds an email address to the given user.- Specified by:
userEmailAddDenyin interfaceIdUClientUsersType- Parameters:
token- The challenge token- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userEmailRemoveBegin
Description copied from interface:IdUClientUsersTypeStart removing the given email address to the current user.- Specified by:
userEmailRemoveBeginin interfaceIdUClientUsersType- Parameters:
email- The email address- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userEmailRemovePermit
Description copied from interface:IdUClientUsersTypeComplete a challenge that removes an email address to the given user.- Specified by:
userEmailRemovePermitin interfaceIdUClientUsersType- Parameters:
token- The challenge token- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userEmailRemoveDeny
Description copied from interface:IdUClientUsersTypeReject a challenge that removes an email address to the given user.- Specified by:
userEmailRemoveDenyin interfaceIdUClientUsersType- Parameters:
token- The challenge token- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userRealNameUpdate
Description copied from interface:IdUClientUsersTypeUpdate the user's realname.- Specified by:
userRealNameUpdatein interfaceIdUClientUsersType- Parameters:
realName- The new realname- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-
userPasswordUpdate
public void userPasswordUpdate(String password, String passwordConfirm) throws IdUClientException, InterruptedException Description copied from interface:IdUClientUsersTypeUpdate the user's password.- Specified by:
userPasswordUpdatein interfaceIdUClientUsersType- Parameters:
password- The passwordpasswordConfirm- The password confirmation- Throws:
IdUClientException- On errorsInterruptedException- On interruption
-