Package org.wildfly.security.auth.server
Interface ModifiableSecurityRealm
-
- All Superinterfaces:
SecurityRealm
- All Known Implementing Classes:
CachingModifiableSecurityRealm
,FileSystemSecurityRealm
,LdapSecurityRealm
public interface ModifiableSecurityRealm extends SecurityRealm
A realm which can be modified.- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from interface org.wildfly.security.auth.server.SecurityRealm
EMPTY_REALM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ModifiableRealmIdentity
getRealmIdentityForUpdate(Principal principal)
Get an update handle for to the identity for the given principal in the context of this security realm.default ModifiableRealmIdentity
getRealmIdentityForUpdate(Evidence evidence)
Get an update handle for to the identity for the given principal in the context of this security realm.ModifiableRealmIdentityIterator
getRealmIdentityIterator()
Get an iterator over all of this realm's identities.-
Methods inherited from interface org.wildfly.security.auth.server.SecurityRealm
getCredentialAcquireSupport, getCredentialAcquireSupport, getEvidenceVerifySupport, getRealmIdentity, getRealmIdentity, getRealmIdentity, handleRealmEvent
-
-
-
-
Method Detail
-
getRealmIdentityForUpdate
default ModifiableRealmIdentity getRealmIdentityForUpdate(Principal principal) throws RealmUnavailableException
Get an update handle for to the identity for the given principal in the context of this security realm. Any validation / name mapping is an implementation detail for the realm. The identity may or may not exist. The returned handle must be cleaned up by a call toRealmIdentity.dispose()
. During the lifespan of aModifiableRealmIdentity
, no other updates or authentications may take place for the corresponding realm identity, thus care should be taken to minimize the duration of the identity's lifespan.If there is not enough information to locate an identity compatible with this realm,
ModifiableRealmIdentity.NON_EXISTENT
may be returned.- Parameters:
principal
- the principal to use to locate theModifiableRealmIdentity
handle (must not benull
)- Returns:
- the
ModifiableRealmIdentity
for the provided information (notnull
) - Throws:
RealmUnavailableException
-
getRealmIdentityForUpdate
default ModifiableRealmIdentity getRealmIdentityForUpdate(Evidence evidence) throws RealmUnavailableException
Get an update handle for to the identity for the given principal in the context of this security realm. Any validation / name mapping is an implementation detail for the realm. The identity may or may not exist. The returned handle must be cleaned up by a call toRealmIdentity.dispose()
. During the lifespan of aModifiableRealmIdentity
, no other updates or authentications may take place for the corresponding realm identity, thus care should be taken to minimize the duration of the identity's lifespan.If there is not enough information to locate an identity compatible with this realm,
ModifiableRealmIdentity.NON_EXISTENT
may be returned.- Parameters:
evidence
- the evidence to use to locate theModifiableRealmIdentity
handle (must not benull
)- Returns:
- the
ModifiableRealmIdentity
for the provided information (notnull
) - Throws:
RealmUnavailableException
-
getRealmIdentityIterator
ModifiableRealmIdentityIterator getRealmIdentityIterator() throws RealmUnavailableException
Get an iterator over all of this realm's identities.- Returns:
- the identity iterator
- Throws:
RealmUnavailableException
- if the realm fails for some reason
-
-