Package org.wildfly.security.auth.server
Class MechanismConfiguration
- java.lang.Object
-
- org.wildfly.security.auth.server.MechanismConfiguration
-
public final class MechanismConfiguration extends Object
A configuration that applies to an authentication mechanism.- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MechanismConfiguration.Builder
A builder for authentication mechanism configuration.
-
Field Summary
Fields Modifier and Type Field Description static MechanismConfiguration
EMPTY
An empty mechanism configuration..
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MechanismConfiguration.Builder
builder()
Obtain a newMechanismConfiguration.Builder
capable of building aMechanismConfiguration
.Function<Principal,Principal>
getFinalRewriter()
Get the final rewriter for this mechanism realm.MechanismRealmConfiguration
getMechanismRealmConfiguration(String realmName)
Get the mechanism realm configuration for the offered realm with the given name.Collection<String>
getMechanismRealmNames()
Get the collection of mechanism realm names, in order.Function<Principal,Principal>
getPostRealmRewriter()
Get the post-realm rewriter for this mechanism realm.Function<Principal,Principal>
getPreRealmRewriter()
Get the pre-realm rewriter for this mechanism realm.RealmMapper
getRealmMapper()
Get the realm mapper.CredentialSource
getServerCredentialSource()
Get the server credential source.
-
-
-
Field Detail
-
EMPTY
public static final MechanismConfiguration EMPTY
An empty mechanism configuration..
-
-
Method Detail
-
getPreRealmRewriter
public Function<Principal,Principal> getPreRealmRewriter()
Get the pre-realm rewriter for this mechanism realm.- Returns:
- the pre-realm rewriter for this mechanism realm, or
null
to use the default
-
getPostRealmRewriter
public Function<Principal,Principal> getPostRealmRewriter()
Get the post-realm rewriter for this mechanism realm.- Returns:
- the post-realm rewriter for this mechanism realm, or
null
to use the default
-
getFinalRewriter
public Function<Principal,Principal> getFinalRewriter()
Get the final rewriter for this mechanism realm.- Returns:
- the final rewriter for this mechanism realm, or
null
to use the default
-
getRealmMapper
public RealmMapper getRealmMapper()
Get the realm mapper.- Returns:
- the realm mapper, or
null
to use the default
-
getMechanismRealmNames
public Collection<String> getMechanismRealmNames()
Get the collection of mechanism realm names, in order. If no realms are configured, the collection will be empty.- Returns:
- the mechanism realm names to offer (may be empty; not
null
)
-
getServerCredentialSource
public CredentialSource getServerCredentialSource()
Get the server credential source.- Returns:
- the server credential source
-
getMechanismRealmConfiguration
public MechanismRealmConfiguration getMechanismRealmConfiguration(String realmName)
Get the mechanism realm configuration for the offered realm with the given name. If the realm name is not known,null
is returned. If the realm name is equal to one of the names returned bygetMechanismRealmNames()
on this same instance then it is guaranteed thatnull
is never returned.- Parameters:
realmName
- the realm name- Returns:
- the realm configuration, or
null
if the realm name is unknown
-
builder
public static MechanismConfiguration.Builder builder()
Obtain a newMechanismConfiguration.Builder
capable of building aMechanismConfiguration
.- Returns:
- a new
MechanismConfiguration.Builder
capable of building aMechanismConfiguration
.
-
-