@NotThreadSafe public class Scope extends java.util.LinkedHashSet<Scope.Value>
Example scope from OpenID Connect indicating access to the user's email and profile details:
Scope scope = new Scope(); scope.add(OIDCScopeValue.OPENID); scope.add(OIDCScopeValue.EMAIL); scope.add(OIDCScopeValue.PROFILE);
Related specifications:
| Modifier and Type | Class and Description |
|---|---|
static class |
Scope.Value
Authorisation scope value.
|
| Constructor and Description |
|---|
Scope()
Creates a new empty authorisation scope.
|
Scope(Scope.Value... values)
Creates a new authorisation scope with the specified values.
|
Scope(Scope scope)
Creates a new scope from the specified scope.
|
Scope(java.lang.String... values)
Creates a new authorisation scope with the specified string values.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.String value)
Adds the specified string value to this scope.
|
boolean |
contains(java.lang.String value)
Checks if this scope contains the specified string value.
|
static Scope |
parse(java.util.Collection<java.lang.String> collection)
Parses a scope from the specified string collection representation.
|
static Scope |
parse(java.lang.String s)
Parses a scope from the specified string representation.
|
java.lang.String |
toString()
Returns the string representation of this scope.
|
java.util.List<java.lang.String> |
toStringList()
Returns the string list representation of this scope.
|
add, clear, clone, contains, isEmpty, iterator, remove, sizeaddAll, containsAll, retainAll, toArray, toArrayfinalize, getClass, notify, notifyAll, wait, wait, waitpublic Scope()
public Scope(Scope scope)
scope - The scope. May be null.public Scope(java.lang.String... values)
values - The string values.public Scope(Scope.Value... values)
values - The values.public boolean add(java.lang.String value)
value - The string value. Must not be null.true if this scope did not already contain the
specified value.public boolean contains(java.lang.String value)
value - The string value. Must not be null.true if the value is contained, else false.public java.lang.String toString()
toString in class java.util.AbstractCollection<Scope.Value>public java.util.List<java.lang.String> toStringList()
public static Scope parse(java.util.Collection<java.lang.String> collection)
collection - The string collection, null if not
specified.null if not specified.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.