authenticate() { if (this.token !== null && !this.token.expired()) { return Promise.resolve(this.token) } this.oauth2 = OAuth2.create(this.config) return this.oauth2.clientCredentials.getToken({ scope: this.scope }).then((result) => { this.token = this.oauth2.accessToken.create(result) return Promise.resolve(this.token) }) }
const oauth2 = simpleOauthModule.create({ client: { id: CLIENT_ID,
const oauth2 = simpleOauthModule.create({ client: { id: CLIENT_ID,
const oauth2 = simpleOauthModule.create({ client: { id: CLIENT_ID,