public interface IdentityManager<I extends Identity> extends IdentityDb<I>
| Modifier and Type | Method and Description |
|---|---|
void |
addAlias(String userId,
String alias)
Add a username/alias for this user.
|
void |
addJwtValidator(JwtValidator v)
Add a JWT validator to the identity manager.
|
boolean |
completePasswordReset(String tag,
String newPassword)
Complete a password reset by providing a tag and a new password.
|
I |
createAnonymousUser()
Create a new anonymous user in the identity manager.
|
I |
createUser(String userId)
Create a new user in the identity manager.
|
void |
deleteUser(String userId)
Delete a user from the identity manager.
|
List<String> |
findUsers(String startingWith)
Find users with a user ID that starts with the given string
|
Collection<String> |
getAliasesFor(String userId)
Get the aliases for a userId.
|
Collection<String> |
getAllUsers()
Get all user IDs in this db.
|
Map<String,I> |
loadAllUsers()
Load all users in this identity manager.
|
ApiKey |
loadApiKeyRecord(String apiKey)
Load an API key record based on the API key ID.
|
I |
loadUser(String userId)
Load a user from the identity manager.
|
I |
loadUserOrAlias(String userIdOrAlias)
Load a user from the identity manager.
|
void |
removeAlias(String alias)
Remove a username/alias from the database.
|
void |
restoreApiKey(ApiKey key)
Restore an API key into the API key store
|
boolean |
userExists(String userId)
Find out if a given user exists.
|
boolean |
userOrAliasExists(String userIdOrAlias)
Find out if a given user or alias exists.
|
authenticate, authenticate, authenticate, createJwtToken, invalidateJwtTokenboolean userExists(String userId) throws IamSvcException
userId - a user IDIamSvcException - when the call cannot be completed due to a service errorboolean userOrAliasExists(String userIdOrAlias) throws IamSvcException
userIdOrAlias - the user ID or an aliasIamSvcException - when the call cannot be completed due to a service errorI loadUser(String userId) throws IamSvcException
userId - a user IDIamSvcException - when the call cannot be completed due to a service errorI loadUserOrAlias(String userIdOrAlias) throws IamSvcException
userIdOrAlias - the actual userId or an aliasIamSvcException - when the call cannot be completed due to a service errorList<String> findUsers(String startingWith) throws IamSvcException
startingWith - a prefix for usersIamSvcException - when the call cannot be completed due to a service errorI createUser(String userId) throws IamIdentityExists, IamSvcException
userId - a user IDIamIdentityExists - if the user existsIamSvcException - when the call cannot be completed due to a service errorI createAnonymousUser() throws IamSvcException
IamSvcException - when the call cannot be completed due to a service errorvoid deleteUser(String userId) throws IamSvcException
userId - a user IDIamSvcException - when the call cannot be completed due to a service errorvoid addAlias(String userId, String alias) throws IamSvcException, IamBadRequestException
userId - a user IDalias - an aliasIamSvcException - when the call cannot be completed due to a service errorIamBadRequestException - if the request is illegalvoid removeAlias(String alias) throws IamBadRequestException, IamSvcException
alias - an aliasIamBadRequestException - If a userId is provided.IamSvcException - when the call cannot be completed due to a service errorCollection<String> getAliasesFor(String userId) throws IamSvcException, IamIdentityDoesNotExist
userId - a user IDIamSvcException - when the call cannot be completed due to a service errorIamIdentityDoesNotExist - if the identity does not existboolean completePasswordReset(String tag, String newPassword) throws IamSvcException
requestPasswordReset
for details on creating a password reset tag.tag - a tagnewPassword - a new passwordIamSvcException - when the call cannot be completed due to a service errorApiKey loadApiKeyRecord(String apiKey) throws IamSvcException
apiKey - an API keyIamSvcException - when the call cannot be completed due to a service errorvoid restoreApiKey(ApiKey key) throws IamIdentityDoesNotExist, IamBadRequestException, IamSvcException
key - IamBadRequestExceptionIamIdentityDoesNotExistIamSvcExceptionvoid addJwtValidator(JwtValidator v)
v - a validatorCollection<String> getAllUsers() throws IamSvcException
IamSvcException - when the call cannot be completed due to a service errorMap<String,I> loadAllUsers() throws IamSvcException
IamSvcException - when the call cannot be completed due to a service errorCopyright © 2023 continual.io. All rights reserved.