@plasma-platform/tm-service-auth

1.2.1 • Public • Published

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

Package Sidebar

Install

npm i @plasma-platform/tm-service-auth

Weekly Downloads

0

Version

1.2.1

License

CC-BY-4.0

Unpacked Size

1.57 MB

Total Files

34

Last publish

Collaborators

  • alienmonster
  • ch-tm
  • viram