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 ModifiableRealmIdentity
NON_EXISTENT
A 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 void
create()
Create this realm identity.void
delete()
Delete this realm identity.void
setAttributes(Attributes attributes)
Modify the attributes collection of this identity.void
setCredentials(Collection<? extends Credential> credentials)
Set the credentials of this identity.default void
updateCredential(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 RealmUnavailableException
Delete 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 RealmUnavailableException
Create this realm identity. After this call,RealmIdentity.exists()
will returntrue
and 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:RealmIdentity
Update a credential of this realm identity.- Specified by:
updateCredential
in 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
-
-