public static final class SecurityDomain.Builder extends Object
Modifier and Type | Method and Description |
---|---|
SecurityDomain.RealmBuilder |
addRealm(String name,
SecurityRealm realm)
Add a realm to this security domain.
|
SecurityDomain |
build()
Construct this security domain.
|
Map<String,RoleMapper> |
getCategoryRoleMappers()
Get the category role mapper map.
|
String |
getDefaultRealmName()
Get the default realm name.
|
void |
setCategoryRoleMappers(Map<String,RoleMapper> categoryRoleMappers)
Set the category role mapper map.
|
SecurityDomain.Builder |
setDefaultRealmName(String defaultRealmName)
Set the default realm name.
|
SecurityDomain.Builder |
setEvidenceDecoder(EvidenceDecoder evidenceDecoder)
Set the evidence decoder for this security domain which will be used to extract the principal from the given
Evidence . |
SecurityDomain.Builder |
setPermissionMapper(PermissionMapper permissionMapper)
Set the permission mapper for this security domain, which will be used to obtain and map permissions based on the
identities from this security domain.
|
SecurityDomain.Builder |
setPostRealmRewriter(Function<Principal,Principal> rewriter)
Sets a post-realm name rewriter, which rewrites the authentication name after a realm is selected.
|
SecurityDomain.Builder |
setPostRealmRewriter(NameRewriter rewriter)
Sets a post-realm name rewriter, which rewrites the authentication name after a realm is selected.
|
SecurityDomain.Builder |
setPreRealmRewriter(Function<Principal,Principal> rewriter)
Sets a pre-realm name rewriter, which rewrites the authentication name before a realm is selected.
|
SecurityDomain.Builder |
setPreRealmRewriter(NameRewriter rewriter)
Sets a pre-realm name rewriter, which rewrites the authentication name before a realm is selected.
|
SecurityDomain.Builder |
setPrincipalDecoder(PrincipalDecoder principalDecoder)
Set the principal decoder for this security domain, which will be used to convert
Principal objects
into names for handling in the realm. |
SecurityDomain.Builder |
setRealmMapper(RealmMapper realmMapper)
Set the realm mapper for this security domain, which selects a realm based on the authentication name.
|
SecurityDomain.Builder |
setRoleMapper(RoleMapper roleMapper)
Set the role mapper for this security domain, which will be used to perform the last mapping before
returning the roles associated with an identity obtained from this security domain.
|
SecurityDomain.Builder |
setSecurityEventListener(Consumer<SecurityEvent> securityEventListener)
Set the security event listener that will consume all
SecurityEvent instances emitted but the domain. |
SecurityDomain.Builder |
setSecurityIdentityTransformer(UnaryOperator<SecurityIdentity> securityIdentityTransformer)
Set the security identity transformer to use.
|
SecurityDomain.Builder |
setTrustedSecurityDomainPredicate(Predicate<SecurityDomain> trustedSecurityDomain)
Set the predicate that should be used to determine if a given domain is trusted by this domain.
|
public SecurityDomain.Builder setPreRealmRewriter(NameRewriter rewriter)
rewriter
- the name rewriter (must not be null
)public SecurityDomain.Builder setPreRealmRewriter(Function<Principal,Principal> rewriter)
rewriter
- the name rewriter (must not be null
)public SecurityDomain.Builder setPostRealmRewriter(NameRewriter rewriter)
rewriter
- the name rewriter (must not be null
)public SecurityDomain.Builder setPostRealmRewriter(Function<Principal,Principal> rewriter)
rewriter
- the name rewriter (must not be null
)public SecurityDomain.Builder setRealmMapper(RealmMapper realmMapper)
realmMapper
- the realm mapper (must not be null
)public SecurityDomain.Builder setRoleMapper(RoleMapper roleMapper)
roleMapper
- the role mapper (must not be null
)public SecurityDomain.Builder setPermissionMapper(PermissionMapper permissionMapper)
permissionMapper
- the permission mapper (must not be null
)public SecurityDomain.Builder setPrincipalDecoder(PrincipalDecoder principalDecoder)
Principal
objects
into names for handling in the realm.principalDecoder
- the principal decoder (must not be null
)public SecurityDomain.RealmBuilder addRealm(String name, SecurityRealm realm)
name
- the realm's name in this configurationrealm
- the realmpublic String getDefaultRealmName()
public SecurityDomain.Builder setDefaultRealmName(String defaultRealmName)
defaultRealmName
- the default realm name (must not be null
)public Map<String,RoleMapper> getCategoryRoleMappers()
public void setCategoryRoleMappers(Map<String,RoleMapper> categoryRoleMappers)
categoryRoleMappers
- the category role mapper map (must not be null
)public SecurityDomain.Builder setSecurityIdentityTransformer(UnaryOperator<SecurityIdentity> securityIdentityTransformer)
null
, or authentication
will fail.securityIdentityTransformer
- the security identity transformer to use (must not be null
)public SecurityDomain.Builder setTrustedSecurityDomainPredicate(Predicate<SecurityDomain> trustedSecurityDomain)
trustedSecurityDomain
- the predicate that should be used to determine if a given domain is
trusted by this domain (must not be null
)public SecurityDomain.Builder setSecurityEventListener(Consumer<SecurityEvent> securityEventListener)
SecurityEvent
instances emitted but the domain.securityEventListener
- the security event listener that will consume all SecurityEvent
instances emitted but the domain.public SecurityDomain.Builder setEvidenceDecoder(EvidenceDecoder evidenceDecoder)
Evidence
.evidenceDecoder
- the evidence decoder (must not be null
)public SecurityDomain build()
createSecurityDomain
ElytronPermission
.Copyright © 2020 JBoss by Red Hat. All rights reserved.