commit
fa78a887fb
4 changed files with 7 additions and 3 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "lhisp-oauth-client",
|
||||
"version": "1.0.24",
|
||||
"version": "1.0.25",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "lhisp-oauth-client",
|
||||
"version": "1.0.24",
|
||||
"version": "1.0.25",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "lhisp-oauth-client",
|
||||
"version": "1.0.24",
|
||||
"version": "1.0.25",
|
||||
"main": "src/index",
|
||||
"types": "src/index.d.ts",
|
||||
"repository": "git@bitbucket.org:leandro_costa/lhisp-oauth-client.git",
|
||||
|
|
|
@ -15,6 +15,7 @@ export interface LhispOauthClientConstructorParams {
|
|||
authHeaderName?: string;
|
||||
tokenHeaderName?: string;
|
||||
headers?: Headers;
|
||||
authHeaders?: Headers;
|
||||
grantType?: string;
|
||||
authContentType?: ContentType;
|
||||
sendAuthCredentialsOnRequestBody?: boolean;
|
||||
|
|
|
@ -25,6 +25,7 @@ export class LhispOauthClient<iAccessToken extends AccessToken = AccessToken> {
|
|||
protected senhaCertificado?: string;
|
||||
protected authScope?: string;
|
||||
protected headers?: AxiosHeaders;
|
||||
protected authHeaders?: AxiosHeaders;
|
||||
protected grantType?: string;
|
||||
protected agent: https.Agent;
|
||||
protected accessToken?: iAccessToken;
|
||||
|
@ -49,6 +50,7 @@ export class LhispOauthClient<iAccessToken extends AccessToken = AccessToken> {
|
|||
|
||||
this.certificado = params.certificado;
|
||||
this.headers = (params.headers ? params.headers : {}) as any as AxiosHeaders;
|
||||
this.authHeaders = (params.authHeaders ? params.authHeaders : {}) as any as AxiosHeaders;
|
||||
this.apiUrl = params.apiUrl;
|
||||
this.authUrl = params.authUrl;
|
||||
this.authScope = params.authScope;
|
||||
|
@ -101,6 +103,7 @@ export class LhispOauthClient<iAccessToken extends AccessToken = AccessToken> {
|
|||
headers: {
|
||||
[this.authHeaderName]: this.getAuthHeaderValue(),
|
||||
"Content-Type": this.authContentType,
|
||||
...this.authHeaders,
|
||||
},
|
||||
data: {},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue