From 05b2091b0a95c3db870313cb6f9960b5d842b276 Mon Sep 17 00:00:00 2001 From: Leandro Costa Date: Thu, 26 Jan 2023 23:05:28 -0300 Subject: [PATCH] Alterando grant type para string --- src/lhisp-oauth-client.t.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lhisp-oauth-client.t.ts b/src/lhisp-oauth-client.t.ts index 1e71b4d..1cb67b9 100644 --- a/src/lhisp-oauth-client.t.ts +++ b/src/lhisp-oauth-client.t.ts @@ -15,7 +15,7 @@ export interface LhispOauthClientConstructorParams { authHeaderName?: string; tokenHeaderName?: string; headers?: Headers; - grantType?: GrantType; + grantType?: string; authContentType?: ContentType; sendAuthCredentialsOnRequestBody?: boolean; debug?: boolean; @@ -34,16 +34,12 @@ export interface AccessToken { created_at?: number; } -export enum GrantType { - CLIENT_CREDENTIALS='client_credentials', -} - export enum ContentType { APPLICATION_JSON='application/json', APPLICATION_X_WWW_FORM_URLENCODED='application/x-www-form-urlencoded', } -export const defaultGrantType = GrantType.CLIENT_CREDENTIALS; +export const defaultGrantType = 'client_credentials'; export const defaultAuthContentType = ContentType.APPLICATION_JSON; export const defaultAuthHeaderName = 'Authorization'; export const defaultTokenHeaderName = 'Authorization'; \ No newline at end of file