@dodi-smart/nuki-graphql-api
Version:
Nuki GraphQL API
26 lines • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OAuth2Service = void 0;
class OAuth2Service {
constructor(httpRequest) {
this.httpRequest = httpRequest;
}
/**
* Refresh access token.
* @param formData Access token request body
* @returns Token Successful Response.
* [The OAuth2.0 Authorization Framework - 5.1. Successful Response](https://tools.ietf.org/html/rfc6749#section-5.1)
* The authorization server issues an access token and optional refresh token, and constructs the response by adding the following parameters to the entity-body of the HTTP response with a 200 (OK) status code.
* @throws ApiError
*/
refreshToken(formData) {
return this.httpRequest.request({
method: 'POST',
url: '/oauth/token',
formData: formData,
mediaType: 'application/x-www-form-urlencoded',
});
}
}
exports.OAuth2Service = OAuth2Service;
//# sourceMappingURL=OAuth2Service.js.map