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