public static final class RoleValidator.RoleConfig extends Object implements AbacValidatorConfig
| Modifier and Type | Class and Description |
|---|---|
static class |
RoleValidator.RoleConfig.Builder
A fluent API builder for
RoleValidator.RoleConfig. |
| Modifier and Type | Method and Description |
|---|---|
static RoleValidator.RoleConfig.Builder |
builder()
A new builder for this class instances.
|
static RoleValidator.RoleConfig |
create(Collection<String> rolesAllowed)
Create roles config from a collection of allowed roles.
|
static RoleValidator.RoleConfig |
create(Config config)
Will read roles allowed from configuration.
|
static RoleValidator.RoleConfig |
create(String... rolesAllowed)
Create roles config from an array of allowed roles.
|
boolean |
denyAll()
Returns true if access should be denied to all.
|
boolean |
permitAll()
Returns true if access should be permitted to all.
|
Set<String> |
serviceRolesAllowed()
Set of roles required for a service.
|
Set<String> |
userRolesAllowed()
Set of roles required for a user.
|
public static RoleValidator.RoleConfig.Builder builder()
public static RoleValidator.RoleConfig create(Collection<String> rolesAllowed)
rolesAllowed - roles allowedpublic static RoleValidator.RoleConfig create(String... rolesAllowed)
rolesAllowed - roles allowedpublic static RoleValidator.RoleConfig create(Config config)
roles-allowed: user: ["role1","role2"] service: ["role3]
config - configuration located on key "roles-allowed"public Set<String> serviceRolesAllowed()
public Set<String> userRolesAllowed()
public boolean permitAll()
public boolean denyAll()
Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.