T
- The type of requirements to which this specification may applypublic abstract class OAuth2ScopeSpecification<T extends OAuth2ScopeRequirement>
extends com.cloudbees.plugins.credentials.domains.DomainSpecification
UNKNOWN
from test(com.cloudbees.plugins.credentials.domains.DomainRequirement)
if the passed requirement doesn't match our descriptor's provider
requirement. It then delegates to _test(T)
, a hook that by default
returns POSITIVE
/NEGATIVE
depending on whether
specifiedScopes
is a superset of the required scopes.Modifier and Type | Class and Description |
---|---|
static class |
OAuth2ScopeSpecification.Descriptor<T extends OAuth2ScopeRequirement>
The base descriptor for specification extensions.
|
Modifier | Constructor and Description |
---|---|
protected |
OAuth2ScopeSpecification(Collection<String> specifiedScopes) |
Modifier and Type | Method and Description |
---|---|
protected com.cloudbees.plugins.credentials.domains.DomainSpecification.Result |
_test(T requirement)
Surfaces a hook for implementations to override or extend the
default functionality of simply matching the set of scopes.
|
OAuth2ScopeSpecification.Descriptor<T> |
getDescriptor() |
Collection<String> |
getSpecifiedScopes()
Surfaces the set of scopes specified by this requirement for
jelly roundtripping.
|
com.cloudbees.plugins.credentials.domains.DomainSpecification.Result |
test(com.cloudbees.plugins.credentials.domains.DomainRequirement requirement)
Tests the scope against this specification.
|
protected OAuth2ScopeSpecification(Collection<String> specifiedScopes)
public final com.cloudbees.plugins.credentials.domains.DomainSpecification.Result test(com.cloudbees.plugins.credentials.domains.DomainRequirement requirement)
test
in class com.cloudbees.plugins.credentials.domains.DomainSpecification
requirement
- The set of requirements to validate against this
specificationprotected com.cloudbees.plugins.credentials.domains.DomainSpecification.Result _test(T requirement)
public Collection<String> getSpecifiedScopes()
public OAuth2ScopeSpecification.Descriptor<T> getDescriptor()
getDescriptor
in interface hudson.model.Describable<com.cloudbees.plugins.credentials.domains.DomainSpecification>
getDescriptor
in class hudson.model.AbstractDescribableImpl<com.cloudbees.plugins.credentials.domains.DomainSpecification>
Copyright © 2004-2014. All Rights Reserved.