Package org.wildfly.security.auth.server
Class MechanismRealmConfiguration.Builder
- java.lang.Object
-
- org.wildfly.security.auth.server.MechanismRealmConfiguration.Builder
-
- Enclosing class:
- MechanismRealmConfiguration
public static final class MechanismRealmConfiguration.Builder extends Object
A builder for mechanism realm configuration.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<Principal,Principal>
finalRewriter
private Function<Principal,Principal>
postRealmRewriter
private Function<Principal,Principal>
preRealmRewriter
private RealmMapper
realmMapper
private String
realmName
-
Constructor Summary
Constructors Constructor Description Builder()
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MechanismRealmConfiguration
build()
Build a new instance.MechanismRealmConfiguration.Builder
setFinalRewriter(Function<Principal,Principal> finalRewriter)
Set a final principal transformer to apply for this mechanism realm.MechanismRealmConfiguration.Builder
setPostRealmRewriter(Function<Principal,Principal> postRealmRewriter)
Set a principal transformer to apply after the realm is selected.MechanismRealmConfiguration.Builder
setPreRealmRewriter(Function<Principal,Principal> preRealmRewriter)
Set a principal transformer to apply before the realm is selected.MechanismRealmConfiguration.Builder
setRealmMapper(RealmMapper realmMapper)
Sets a realm mapper to be used by the mechanism.MechanismRealmConfiguration.Builder
setRealmName(String realmName)
Sets a name of the realm to be presented by the mechanism.
-
-
-
Field Detail
-
realmName
private String realmName
-
realmMapper
private RealmMapper realmMapper
-
-
Method Detail
-
setRealmName
public MechanismRealmConfiguration.Builder setRealmName(String realmName)
Sets a name of the realm to be presented by the mechanism.- Parameters:
realmName
- a name of the realm to be presented by the mechanism- Returns:
- this builder
-
setPreRealmRewriter
public MechanismRealmConfiguration.Builder setPreRealmRewriter(Function<Principal,Principal> preRealmRewriter)
Set a principal transformer to apply before the realm is selected.- Parameters:
preRealmRewriter
- a principal transformer to apply before the realm is selected- Returns:
- this builder
-
setPostRealmRewriter
public MechanismRealmConfiguration.Builder setPostRealmRewriter(Function<Principal,Principal> postRealmRewriter)
Set a principal transformer to apply after the realm is selected. Any previously set credential source will be overwritten.- Parameters:
postRealmRewriter
- a principal transformer to apply after the realm is selected- Returns:
- this builder
-
setFinalRewriter
public MechanismRealmConfiguration.Builder setFinalRewriter(Function<Principal,Principal> finalRewriter)
Set a final principal transformer to apply for this mechanism realm. Any previously set credential source will be overwritten.- Parameters:
finalRewriter
- a final principal transformer to apply for this mechanism realm- Returns:
- this builder
-
setRealmMapper
public MechanismRealmConfiguration.Builder setRealmMapper(RealmMapper realmMapper)
Sets a realm mapper to be used by the mechanism. Any previously set credential source will be overwritten.- Parameters:
realmMapper
- a realm mapper to be used by the mechanism- Returns:
- this builder
-
build
public MechanismRealmConfiguration build()
Build a new instance.- Returns:
- a new instance
-
-