1.2.1 • Published 6 years ago
@plasma-platform/tm-service-auth v1.2.1
Auth Service API
Documentation
Table of Contents
AuthService
Auth Service API that you may adopt for your needs
Parameters
url
string service urltoken
(string | null) user access tocken if available (optional, defaultnull
)
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