Package org.wildfly.security.auth.server
Class SecurityDomain.RealmBuilder
- java.lang.Object
-
- org.wildfly.security.auth.server.SecurityDomain.RealmBuilder
-
- Enclosing class:
- SecurityDomain
public static class SecurityDomain.RealmBuilder extends Object
A builder for a realm within a security domain.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
built
private String
name
private SecurityDomain.Builder
parent
private Function<Principal,Principal>
principalRewriter
private SecurityRealm
realm
private RoleDecoder
roleDecoder
private RoleMapper
roleMapper
-
Constructor Summary
Constructors Constructor Description RealmBuilder(SecurityDomain.Builder parent, String name, SecurityRealm realm)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private void
assertNotBuilt()
SecurityDomain.Builder
build()
Constructs this realm info and adds it into the domain.String
getName()
Get the realm name.Function<Principal,Principal>
getPrincipalRewriter()
Get the name rewriter.SecurityRealm
getRealm()
Get the security realm.RoleDecoder
getRoleDecoder()
Get the role decoder.RoleMapper
getRoleMapper()
Get the role mapper.SecurityDomain.RealmBuilder
setNameRewriter(NameRewriter nameRewriter)
Deprecated.SecurityDomain.RealmBuilder
setPrincipalRewriter(Function<Principal,Principal> principalRewriter)
Set the name rewriter.SecurityDomain.RealmBuilder
setRoleDecoder(RoleDecoder roleDecoder)
Set the role decoder.SecurityDomain.RealmBuilder
setRoleMapper(RoleMapper roleMapper)
Set the role mapper.
-
-
-
Field Detail
-
parent
private final SecurityDomain.Builder parent
-
name
private final String name
-
realm
private final SecurityRealm realm
-
roleMapper
private RoleMapper roleMapper
-
roleDecoder
private RoleDecoder roleDecoder
-
built
private boolean built
-
-
Constructor Detail
-
RealmBuilder
RealmBuilder(SecurityDomain.Builder parent, String name, SecurityRealm realm)
-
-
Method Detail
-
getName
public String getName()
Get the realm name.- Returns:
- the realm name (not
null
)
-
getRealm
public SecurityRealm getRealm()
Get the security realm.- Returns:
- the security realm (not
null
)
-
getRoleMapper
public RoleMapper getRoleMapper()
Get the role mapper.- Returns:
- the role mapper (not
null
)
-
setRoleMapper
public SecurityDomain.RealmBuilder setRoleMapper(RoleMapper roleMapper)
Set the role mapper.- Parameters:
roleMapper
- the role mapper (may not benull
)
-
getPrincipalRewriter
public Function<Principal,Principal> getPrincipalRewriter()
Get the name rewriter.- Returns:
- the name rewriter (not
null
)
-
setPrincipalRewriter
public SecurityDomain.RealmBuilder setPrincipalRewriter(Function<Principal,Principal> principalRewriter)
Set the name rewriter.- Parameters:
principalRewriter
- the name rewriter (may not benull
)
-
setNameRewriter
@Deprecated public SecurityDomain.RealmBuilder setNameRewriter(NameRewriter nameRewriter)
Deprecated.
-
getRoleDecoder
public RoleDecoder getRoleDecoder()
Get the role decoder.- Returns:
- the role decoder (not
null
)
-
setRoleDecoder
public SecurityDomain.RealmBuilder setRoleDecoder(RoleDecoder roleDecoder)
Set the role decoder.- Parameters:
roleDecoder
- the role decoder (may not benull
)
-
build
public SecurityDomain.Builder build()
Constructs this realm info and adds it into the domain.- Returns:
- the security domain builder
-
assertNotBuilt
private void assertNotBuilt()
-
-