Class: Verizon::OauthScopeThingspaceOauthEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/verizon/models/oauth_scope_thingspace_oauth_enum.rb

Overview

OAuth 2 scopes supported by the API

Constant Summary collapse

OAUTH_SCOPE_THINGSPACE_OAUTH_ENUM =
[
  # Grant read-only access to discovery data
  DISCOVERYREAD = 'discovery:read'.freeze,

  # Grant read-only access to service profile data
  SERVICEPROFILEREAD = 'serviceprofile:read'.freeze,

  # Grant write access to service profile data
  SERVICEPROFILEWRITE = 'serviceprofile:write'.freeze,

  # Grant read-only access to Service registry data
  SERVICEREGISTRYREAD = 'serviceregistry:read'.freeze,

  # Grant write access to Service registry data
  SERVICEREGISTRYWRITE = 'serviceregistry:write'.freeze,

  # Full access for /serviceprofiles and /serviceendpoints.
  TS_MEC_FULLACCESS = 'ts.mec.fullaccess'.freeze,

  # Limited access. Will not allow use of /serviceprofiles and
  # /serviceendpoints but will allow discovery.
  TS_MEC_LIMITACCESS = 'ts.mec.limitaccess'.freeze,

  # TODO: Write general description for TS_APPLICATION_RO
  TS_APPLICATION_RO = 'ts.application.ro'.freeze,

  # Read access to the discovery service
  EDGEDISCOVERYREAD = 'edge:discovery:read'.freeze,

  # Read access to the service profile service
  EDGESERVICEPROFILEREAD = 'edge:serviceprofile:read'.freeze,

  # Write access to the service profile service
  EDGESERVICEPROFILEWRITE = 'edge:serviceprofile:write'.freeze,

  # Read access to the service registry service
  EDGESERVICEREGISTRYREAD = 'edge:serviceregistry:read'.freeze,

  # Write access to the service registry service
  EDGESERVICEREGISTRYWRITE = 'edge:serviceregistry:write'.freeze,

  # read access
  READ = 'read'.freeze,

  # read/write access
  WRITE = 'write'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



57
58
59
60
61
# File 'lib/verizon/models/oauth_scope_thingspace_oauth_enum.rb', line 57

def self.validate(value)
  return false if value.nil?

  OAUTH_SCOPE_THINGSPACE_OAUTH_ENUM.include?(value)
end