1.2.1 • Published 6 years ago

@plasma-platform/tm-service-auth v1.2.1

Weekly downloads
-
License
CC-BY-4.0
Repository
gitlab
Last release
6 years ago

Auth Service API

Documentation

Table of Contents

AuthService

Auth Service API that you may adopt for your needs

Parameters

  • url string service url
  • token (string | null) user access tocken if available (optional, default null)

messages

Object with class service messages

get

Get auth token

Examples

Get auth token

(async () => {
  const auth = new AuthService('//api.templatemonster.com/oauth/');
  const token = await auth.get();
})();

Returns Token token object

delete

Revoke auth token

Examples

Revoke auth token

(async () => {
  const auth = new AuthService('//api.templatemonster.com/oauth/');
  await auth.delete();
})();

token

Auth Token Object

Type: Token

Properties

  • owner_id number ID of token owner
  • owner_type string Token owner type (user or client)
  • access_token string Access token
  • client_id string Client ID
  • scopes string Set of scopes associated with token