oAuth
new Oauth(grantType, tokenKey)
Name
Type
Description
// Refresh token flow.
const Oauth = require('vendor/Oauth.js');
const oauth = new Oauth('refresh_token', 'service.oauth');// Username password flow.
const Oauth = require('vendor/Oauth.js');
// Save username and password from external standalone secrets.
let token = JSON.decode(Mesa.secret.get('service.oauth', '{}'));
token.username = Mesa.secret.get('service-username');
token.password = Mesa.secret.get('service-password');
Mesa.secret.set('service.oauth', JSON.stringify(token));
const oauth = new Oauth('password', 'service.oauth');constructor(grantType, tokenKey, hasHeaders)
Name
Type
Description
init()
request(method, path, data, options)
Name
Type
Description
get(path[, options])
Name
Type
Description
post(path, data[, options])
Name
Type
Description
put(path, data[, options])
Name
Type
Description
patch(path, data[, options])
Name
Type
Description
delete(path[, options])
Name
Type
Description
Last updated