Package org.wildfly.security.auth.server
Interface ModifiableRealmIdentity
-
- All Superinterfaces:
RealmIdentity
public interface ModifiableRealmIdentity extends RealmIdentity
A realm identity which is modifiable.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description static ModifiableRealmIdentityNON_EXISTENTA modifiable identity for a non-existent user who cannot be created.-
Fields inherited from interface org.wildfly.security.auth.server.RealmIdentity
ANONYMOUS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcreate()Create this realm identity.voiddelete()Delete this realm identity.voidsetAttributes(Attributes attributes)Modify the attributes collection of this identity.voidsetCredentials(Collection<? extends Credential> credentials)Set the credentials of this identity.default voidupdateCredential(Credential credential)Update a credential of this realm identity.-
Methods inherited from interface org.wildfly.security.auth.server.RealmIdentity
applyToCredential, applyToCredential, applyToCredential, dispose, exists, getAttributes, getAuthorizationIdentity, getCredential, getCredential, getCredential, getCredentialAcquireSupport, getCredentialAcquireSupport, getEvidenceVerifySupport, getRealmIdentityPrincipal, verifyEvidence
-
-
-
-
Field Detail
-
NON_EXISTENT
static final ModifiableRealmIdentity NON_EXISTENT
A modifiable identity for a non-existent user who cannot be created.
-
-
Method Detail
-
delete
void delete() throws RealmUnavailableExceptionDelete this realm identity. After this call,RealmIdentity.exists()will returnfalse. If the identity does not exist, an exception is thrown.- Throws:
RealmUnavailableException- if deletion fails for some reason
-
create
void create() throws RealmUnavailableExceptionCreate this realm identity. After this call,RealmIdentity.exists()will returntrueand the credentials and role sets will be empty. If the identity already exists, an exception is thrown.- Throws:
RealmUnavailableException- if creation fails for some reason
-
setCredentials
void setCredentials(Collection<? extends Credential> credentials) throws RealmUnavailableException
Set the credentials of this identity. If the identity does not exist, an exception is thrown. Any existing credential(s) are replaced/updated with the new value (in a possibly realm-specific manner).- Parameters:
credentials- the new credentials to set- Throws:
RealmUnavailableException- if updating the credentials fails for some reason
-
updateCredential
default void updateCredential(Credential credential) throws RealmUnavailableException
Description copied from interface:RealmIdentityUpdate a credential of this realm identity.- Specified by:
updateCredentialin interfaceRealmIdentity- Parameters:
credential- the new credential (must not benull)- Throws:
RealmUnavailableException- if the realm is not able to handle requests for any reason
-
setAttributes
void setAttributes(Attributes attributes) throws RealmUnavailableException
Modify the attributes collection of this identity. If the identity does not exist, an exception is thrown.- Parameters:
attributes- the new attributes collection- Throws:
RealmUnavailableException- if updating the attributes collection fails for some reason
-
-