Package org.wildfly.security.auth.realm
Class LegacyPropertiesSecurityRealm
- java.lang.Object
-
- org.wildfly.security.auth.realm.LegacyPropertiesSecurityRealm
-
- All Implemented Interfaces:
SecurityRealm
public class LegacyPropertiesSecurityRealm extends Object implements SecurityRealm
ASecurityRealmimplementation that makes use of the legacy properties files.- Author:
- Darran Lofthouse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLegacyPropertiesSecurityRealm.BuilderA builder for legacy properties security realms.
-
Field Summary
-
Fields inherited from interface org.wildfly.security.auth.server.SecurityRealm
EMPTY_REALM
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LegacyPropertiesSecurityRealm.Builderbuilder()Obtain a newLegacyPropertiesSecurityRealm.Buildercapable of building aLegacyPropertiesSecurityRealm.SupportLevelgetCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)SupportLevelgetEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName)longgetLoadTime()Get the time when the realm was last loaded.RealmIdentitygetRealmIdentity(Principal principal)voidload(InputStream usersStream, InputStream groupsStream)Loads this properties security realm from the given user and groups input streams.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.auth.server.SecurityRealm
getCredentialAcquireSupport, getRealmIdentity, getRealmIdentity, handleRealmEvent
-
-
-
-
Method Detail
-
getRealmIdentity
public RealmIdentity getRealmIdentity(Principal principal) throws RealmUnavailableException
- Specified by:
getRealmIdentityin interfaceSecurityRealm- Throws:
RealmUnavailableException
-
getCredentialAcquireSupport
public SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws RealmUnavailableException
- Specified by:
getCredentialAcquireSupportin interfaceSecurityRealm- Throws:
RealmUnavailableException
-
getEvidenceVerifySupport
public SupportLevel getEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName) throws RealmUnavailableException
- Specified by:
getEvidenceVerifySupportin interfaceSecurityRealm- Throws:
RealmUnavailableException
-
load
public void load(InputStream usersStream, InputStream groupsStream) throws IOException
Loads this properties security realm from the given user and groups input streams.- Parameters:
usersStream- the input stream from which the realm users are loadedgroupsStream- the input stream from which the roles of realm users are loaded- Throws:
IOException- if there is problem while reading the input streams or invalid content is loaded from streams
-
getLoadTime
public long getLoadTime()
Get the time when the realm was last loaded.- Returns:
- the time when the realm was last loaded (number of milliseconds since the standard base time)
-
builder
public static LegacyPropertiesSecurityRealm.Builder builder()
Obtain a newLegacyPropertiesSecurityRealm.Buildercapable of building aLegacyPropertiesSecurityRealm.- Returns:
- a new
LegacyPropertiesSecurityRealm.Buildercapable of building aLegacyPropertiesSecurityRealm.
-
-