public interface IdentityManager
Manages all Identity Management related operations.
Modifier and Type | Field and Description |
---|---|
static String |
IDENTITY_MANAGER_CTX_PARAMETER
The active IdentityManager instance may be stored in the IdentityContext under this parameter name
|
Modifier and Type | Method and Description |
---|---|
void |
add(IdentityType identityType)
Adds the given
IdentityType instance to the configured identity store. |
<T extends IdentityType> |
createIdentityQuery(Class<T> identityType)
Deprecated.
Use the
getQueryBuilder() to create queries. |
IdentityQueryBuilder |
getQueryBuilder()
Returns a
IdentityQueryBuilder , responsible for building queries. |
<T extends IdentityType> |
lookupIdentityById(Class<T> identityType,
String id)
Retrieves an
IdentityType with the given identifier. |
void |
remove(IdentityType value)
Removes the given
IdentityType instance from the configured identity store. |
void |
removeCredential(Account account,
Class<? extends CredentialStorage> storageClass)
Removes all credentials stored by a certain
CredentialStorage associated
with the given Account . |
<T extends CredentialStorage> |
retrieveCredentials(Account account,
Class<T> storageClass)
Returns a list of all stored credential values for the specified account and credential storage class
|
<T extends CredentialStorage> |
retrieveCurrentCredential(Account account,
Class<T> storageClass)
Returns the current stored credential value for the specific account and credential storage class
|
void |
update(IdentityType identityType)
Updates the given
IdentityType instance. |
void |
updateCredential(Account account,
Object credential)
Updates a credential for the given
Account . |
void |
updateCredential(Account account,
Object credential,
Date effectiveDate,
Date expiryDate)
Updates a credential for the given
Account . |
void |
validateCredentials(Credentials credentials)
Validates the given
Credentials . |
static final String IDENTITY_MANAGER_CTX_PARAMETER
void add(IdentityType identityType) throws IdentityManagementException
Adds the given IdentityType
instance to the configured identity store.
identityType
- IdentityManagementException
- If cannot store the provided IdentityType
instance.void update(IdentityType identityType) throws IdentityManagementException
Updates the given IdentityType
instance. The instance must have an identifier, otherwise a exception will be
thrown.
identityType
- IdentityManagementException
- If cannot update the provided IdentityType
instance.void remove(IdentityType value) throws IdentityManagementException
Removes the given IdentityType
instance from the configured identity store. The instance must have an identifier,
otherwise a exception will be thrown.
value
- IdentityManagementException
- If cannot remove the provided IdentityType
instance.IdentityQueryBuilder getQueryBuilder()
Returns a IdentityQueryBuilder
, responsible for building queries.
<T extends IdentityType> T lookupIdentityById(Class<T> identityType, String id)
Retrieves an IdentityType
with the given identifier.
The first argument tells which IdentityType
type should be returned. If you provide the IdentityType
base
interface any IdentityType
instance that matches the given identifier will be returned.
identityType
- id
- IdentityType
is found with the given identifier this method returns null.@Deprecated <T extends IdentityType> IdentityQuery<T> createIdentityQuery(Class<T> identityType)
getQueryBuilder()
to create queries.
Creates an IdentityQuery
that can be used to query for IdentityType
instances.
The first argument tells which IdentityType
type should be returned. If you provide the IdentityType
base
interface any IdentityType
instance that matches the provided query parameters will be returned.
identityType
- void validateCredentials(Credentials credentials)
Validates the given Credentials
.
To check the validation status you should use the Credentials.getStatus
method.
credentials
- void updateCredential(Account account, Object credential)
Updates a credential for the given Account
.
account
- credential
- The credential
must be a object supported by any CredentialHandler
.
Examples of credentials are the Password
and Digest
types.void updateCredential(Account account, Object credential, Date effectiveDate, Date expiryDate)
Updates a credential for the given Account
.
This methods also allows to specify the expiration and effective date for the credential.
account
- credential
- The credential
must be a object supported by any CredentialHandler
.
Examples of credentials are the Password
and Digest
types.<T extends CredentialStorage> T retrieveCurrentCredential(Account account, Class<T> storageClass)
account
- storageClass
- <T extends CredentialStorage> List<T> retrieveCredentials(Account account, Class<T> storageClass)
account
- storageClass
- void removeCredential(Account account, Class<? extends CredentialStorage> storageClass)
Removes all credentials stored by a certain CredentialStorage
associated
with the given Account
.
account
- The account which credentials should be removed.storageClass
- The credential storage type specifying which credential types should be removed.Copyright © 2018 JBoss by Red Hat. All rights reserved.