public interface SecurityRealm
Modifier and Type | Field and Description |
---|---|
static SecurityRealm |
EMPTY_REALM
An empty security realm.
|
Modifier and Type | Method and Description |
---|---|
default SupportLevel |
getCredentialAcquireSupport(Class<? extends Credential> credentialType,
String algorithmName)
Deprecated.
Transition method; remove before GA.
|
SupportLevel |
getCredentialAcquireSupport(Class<? extends Credential> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec)
Determine whether a credential of the given type and algorithm is definitely obtainable, possibly obtainable (for]
some identities), or definitely not obtainable.
|
SupportLevel |
getEvidenceVerifySupport(Class<? extends Evidence> evidenceType,
String algorithmName)
Determine whether a given type of evidence is definitely verifiable, possibly verifiable (for some identities),
or definitely not verifiable.
|
default RealmIdentity |
getRealmIdentity(Evidence evidence)
Get a handle for to the identity for the given evidence in the context of this security realm.
|
default RealmIdentity |
getRealmIdentity(Principal principal)
Get a handle for to the identity for the given principal in the context of this security realm.
|
default void |
handleRealmEvent(RealmEvent event)
Handle a realm event.
|
static void |
safeHandleRealmEvent(SecurityRealm realm,
RealmEvent event)
Safely pass an event to a security realm, absorbing and logging any exception that occurs.
|
static final SecurityRealm EMPTY_REALM
default RealmIdentity getRealmIdentity(Principal principal) throws RealmUnavailableException
RealmIdentity.dispose()
.principal
- the principal which identifies the identity within the realm (must not be null
)RealmIdentity
for the provided principal (not null
)RealmUnavailableException
default RealmIdentity getRealmIdentity(Evidence evidence) throws RealmUnavailableException
RealmIdentity.dispose()
.
Where this method is used to obtain a RealmIdentity
prior to evidence verification the method
RealmIdentity.getEvidenceVerifySupport(Class, String)
will be used to verify if the identity is usable.evidence
- an evidence instance which identifies the identity within the realm (must not be null
)RealmIdentity
for the provided evidence (not null
)RealmUnavailableException
default SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName) throws RealmUnavailableException
RealmUnavailableException
SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws RealmUnavailableException
credentialType
- the exact credential type (must not be null
)algorithmName
- the algorithm name, or null
if any algorithm is acceptable or the credential type does
not support algorithm namesparameterSpec
- the algorithm parameters to match, or null
if any parameters are acceptable or the credential type
does not support algorithm parametersRealmUnavailableException
- if the realm is not able to handle requests for any reasonSupportLevel getEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName) throws RealmUnavailableException
evidenceType
- the type of evidence to be verified (must not be null
)algorithmName
- the algorithm name, or null
if any algorithm is acceptable or the evidence type does
not support algorithm namesRealmUnavailableException
- if the realm is not able to handle requests for any reasondefault void handleRealmEvent(RealmEvent event)
The default implementation does nothing.
event
- the realm eventstatic void safeHandleRealmEvent(SecurityRealm realm, RealmEvent event)
realm
- the security realm to notify (not null
)event
- the event to send (not null
)Copyright © 2020 JBoss by Red Hat. All rights reserved.