T - type of configuration used by this validator. Each validator must have its own AbacValidatorConfig class, so
we can uniquely identify the one to callpublic interface AbacValidator<T extends AbacValidatorConfig>
AbacAnnotation, so we can check all are processed even
if validator is missing| Modifier and Type | Method and Description |
|---|---|
T |
combine(T parent,
T child)
Combine two configuration (such as one obtained from annotation and one from config).
|
java.lang.Class<T> |
configClass()
Class of the configuration type.
|
java.lang.String |
configKey()
Key of a configuration entry that maps to this validator's configuration.
|
T |
fromAnnotations(java.util.List<? extends java.lang.annotation.Annotation> annotations)
Load configuration class instance from annotations this validator expects.
|
T |
fromConfig(Config config)
Load configuration class instance from
Config. |
default java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> |
supportedAnnotations()
Provide extension annotations supported by this validator (e.g.
|
void |
validate(T config,
Errors.Collector collector,
ProviderRequest request)
Validate that the configuration provided would grant access to the resource.
|
default java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> supportedAnnotations()
RolesAllowed).
Annotations will be collected according to framework in use. For JAX-RS, annotations from application class, resource
class and resource methods will be collected.
The annotations will be transformed to configuration by fromAnnotations(List).java.lang.Class<T> configClass()
java.lang.String configKey()
ConfigT fromConfig(Config config)
Config.config - configuration located on the key this validator expects in configKey()T fromAnnotations(java.util.List<? extends java.lang.annotation.Annotation> annotations)
annotations - annotations collected from resource if annotations are supportedT combine(T parent, T child)
parent - The parent configuration (e.g. obtained from annotation)child - The child configuration (e.g. obtained from explicit object)void validate(T config, Errors.Collector collector, ProviderRequest request)
Errors.Collector#fatal(Object, String).config - configuration of this validatorcollector - error collector to gather issues with this request (e.g. "service not in role ABC")request - ABAC context containing subject(s), object(s) and environmentCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.