public interface

Scope

com.amazon.identity.auth.device.api.authorization.Scope

Class Overview

Defines the programmatic concept of an OAuth 2.0 scope. The AuthorizationManager and related APIs take in scopes that conform to this interface. There are multiple ways to get a Scope object:

  1. For general profile data about the Amazon customer, use the ProfileScope factory.
  2. For scopes related to a Login With Amazon-enabled SDK, refer to the SDK's documentation.
  3. If a Scope is not provided by an SDK, use the ScopeFactory factory methods to create one.
{@since 3.0 }

Summary

Public Methods
abstract String getName()
The literal scope name of an OAuth 2.0 request scope.
abstract JSONObject getScopeData()
A Scope can have additional data passed in as part of authorization.

Public Methods

public abstract String getName ()

The literal scope name of an OAuth 2.0 request scope.

An example of this would be "profile" for the Scope returned by the profile() factory method.

Returns
  • The literal string value of the scope. Must return a non-null and valid OAuth 2.0 scope parameter name.

public abstract JSONObject getScopeData ()

A Scope can have additional data passed in as part of authorization. This additional data is returned by the Scope implementation as a JSON representation.

Returns
  • Additional scope data if desired, otherwise null.