com.nimbusds.oauth2.sdk
Class ScopeToken

java.lang.Object
  extended by com.nimbusds.oauth2.sdk.id.Identifier
      extended by com.nimbusds.oauth2.sdk.ScopeToken
All Implemented Interfaces:
net.minidev.json.JSONAware
Direct Known Subclasses:
OIDCScopeToken

@Immutable
public class ScopeToken
extends Identifier

Authorisation Scope token. This class is immutable.

Version:
$version$ (2013-01-21)
Author:
Vladimir Dzhuvinov

Nested Class Summary
static class ScopeToken.Requirement
          Enumeration of the scope token requirements for application-specific authorisation requests.
 
Constructor Summary
ScopeToken(String value)
          Creates a new scope token with the specified value.
ScopeToken(String value, ScopeToken.Requirement requirement)
          Creates a new scope token with the specified value and optional requirement.
 
Method Summary
 boolean equals(Object object)
          Overrides Object.equals().
 ScopeToken.Requirement getRequirement()
          Gets the requirement of this scope token.
 
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier
getValue, hashCode, toJSONString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScopeToken

public ScopeToken(String value)
Creates a new scope token with the specified value. The requirement is not specified.

Parameters:
value - The scope token value. Must not be null or empty string.

ScopeToken

public ScopeToken(String value,
                  ScopeToken.Requirement requirement)
Creates a new scope token with the specified value and optional requirement.

Parameters:
value - The scope token value. Must not be null or empty string.
requirement - The requirement, null if not specified.
Method Detail

getRequirement

public ScopeToken.Requirement getRequirement()
Gets the requirement of this scope token.

Returns:
The requirement, null if not specified.

equals

public boolean equals(Object object)
Description copied from class: Identifier
Overrides Object.equals().

Specified by:
equals in class Identifier
Parameters:
object - The object to compare to.
Returns:
true if the objects have the same value, otherwise false.


Copyright © 2013 NimbusDS. All Rights Reserved.