AbacValidatorConfigpublic static class RoleValidator.RoleConfig extends java.lang.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(java.lang.String... rolesAllowed) |
Create roles config from an array of allowed roles.
|
static RoleValidator.RoleConfig |
from(java.util.Collection<java.lang.String> rolesAllowed) |
Create roles config from a collection of allowed roles.
|
java.util.Set<java.lang.String> |
getServiceRolesAllowed() |
Set of roles required for a service.
|
java.util.Set<java.lang.String> |
getUserRolesAllowed() |
Set of roles required for a user.
|
public static RoleValidator.RoleConfig.Builder builder()
public static RoleValidator.RoleConfig from(java.util.Collection<java.lang.String> rolesAllowed)
rolesAllowed - roles allowedpublic static RoleValidator.RoleConfig from(java.lang.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 java.util.Set<java.lang.String> getServiceRolesAllowed()
public java.util.Set<java.lang.String> getUserRolesAllowed()
Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.