Package com.authlete.common.dto
Class Scope
- java.lang.Object
-
- com.authlete.common.dto.Scope
-
- All Implemented Interfaces:
Serializable
public class Scope extends Object implements Serializable
Information about a scope of a service.- Author:
- Takahiko Kawasaki
- See Also:
- RFC 6749 (OAuth 2.0), 3.3. Access Token Scope, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Scope.NameComparator
Comparator based on scope names.
-
Constructor Summary
Constructors Constructor Description Scope()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String[]
extractNames(Scope[] scopes)
Extract scope names.Pair[]
getAttributes()
Get attributes.String
getDescription()
Get the description.TaggedValue[]
getDescriptions()
Get descriptions for various languages.String
getName()
Get the scope name.boolean
isDefaultEntry()
Get the flag that indicates whether this scope is included in the default scope list.Scope
setAttributes(Pair[] attributes)
Set attributes.Scope
setAttributes(Iterable<Pair> attributes)
Set attributes.Scope
setDefaultEntry(boolean defaultEntry)
Set the flag that indicates whether this scope is included in the default scope list.Scope
setDescription(String description)
Set the description.Scope
setDescriptions(TaggedValue[] descriptions)
Set descriptions for various languages.Scope
setName(String name)
Set the scope name.
-
-
-
Method Detail
-
getName
public String getName()
Get the scope name.- Returns:
- The scope name.
- See Also:
- RFC 6749 (OAuth 2.0), 3.3. Access Token Scope
-
setName
public Scope setName(String name)
Set the scope name.- Parameters:
name
- The scope name.- Returns:
this
object.- See Also:
- RFC 6749 (OAuth 2.0), 3.3. Access Token Scope
-
isDefaultEntry
public boolean isDefaultEntry()
Get the flag that indicates whether this scope is included in the default scope list.- Returns:
true
if this scope is included in the default scope list. Otherwise,false
.
-
setDefaultEntry
public Scope setDefaultEntry(boolean defaultEntry)
Set the flag that indicates whether this scope is included in the default scope list.- Parameters:
defaultEntry
-true
to include this scope in the default scope list. Otherwise,false
.- Returns:
this
object.
-
getDescription
public String getDescription()
Get the description.- Returns:
- The description.
-
setDescription
public Scope setDescription(String description)
Set the description.- Parameters:
description
- The description.- Returns:
this
object.
-
getDescriptions
public TaggedValue[] getDescriptions()
Get descriptions for various languages.- Returns:
- Descriptions.
- Since:
- 1.5
-
setDescriptions
public Scope setDescriptions(TaggedValue[] descriptions)
Set descriptions for various languages.- Parameters:
descriptions
- Descriptions.- Returns:
this
object.- Since:
- 1.5
-
getAttributes
public Pair[] getAttributes()
Get attributes.- Returns:
- Attributes.
- Since:
- 2.12
-
setAttributes
public Scope setAttributes(Pair[] attributes)
Set attributes.- Parameters:
attributes
- Attributes.- Returns:
this
object.- Since:
- 2.12
-
setAttributes
public Scope setAttributes(Iterable<Pair> attributes)
Set attributes.- Parameters:
attributes
- Attributes.- Returns:
this
object.- Since:
- 2.12
-
-