@frontegg/rest-api 7.111.0-alpha.3 → 7.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth/index.d.ts +4 -0
- package/auth/index.js +8 -0
- package/index.js +1 -1
- package/node/auth/index.js +8 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.d.ts
CHANGED
|
@@ -741,6 +741,10 @@ export declare class AuthenticationApi extends BaseApiClient {
|
|
|
741
741
|
oidcPostLoginV2: (body: IOidcPostLoginV2) => Promise<ILoginResponse>;
|
|
742
742
|
exchangeOAuthTokensV2: (body: IExchangeOAuthTokens) => Promise<ILoginResponseV3>;
|
|
743
743
|
silentOAuthRefreshTokenV2: () => Promise<ILoginResponseV3>;
|
|
744
|
+
silentOAuthRefreshTokenV3: (tokens: {
|
|
745
|
+
accessToken: string;
|
|
746
|
+
refreshToken: string;
|
|
747
|
+
}) => Promise<ILoginResponseV3>;
|
|
744
748
|
exchangeOAuthTokens: (body: IExchangeOAuthTokens) => Promise<ILoginResponse>;
|
|
745
749
|
silentOAuthRefreshToken: () => Promise<ILoginResponse>;
|
|
746
750
|
/**
|
package/auth/index.js
CHANGED
|
@@ -675,6 +675,14 @@ export class AuthenticationApi extends BaseApiClient {
|
|
|
675
675
|
});
|
|
676
676
|
return this.generateLoginResponseFromOAuthResponseV2(data);
|
|
677
677
|
};
|
|
678
|
+
this.silentOAuthRefreshTokenV3 = async tokens => {
|
|
679
|
+
const oauthResponse = {
|
|
680
|
+
access_token: tokens.accessToken,
|
|
681
|
+
id_token: tokens.accessToken,
|
|
682
|
+
refresh_token: tokens.refreshToken
|
|
683
|
+
};
|
|
684
|
+
return this.generateLoginResponseFromOAuthResponseV2(oauthResponse);
|
|
685
|
+
};
|
|
678
686
|
this.exchangeOAuthTokens = async body => {
|
|
679
687
|
const data = await this.post(`${urls.oauth.v1}/token`, body);
|
|
680
688
|
return this.generateLoginResponseFromOAuthResponse(data);
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -740,6 +740,14 @@ class AuthenticationApi extends _BaseApiClient.BaseApiClient {
|
|
|
740
740
|
});
|
|
741
741
|
return this.generateLoginResponseFromOAuthResponseV2(data);
|
|
742
742
|
};
|
|
743
|
+
this.silentOAuthRefreshTokenV3 = async tokens => {
|
|
744
|
+
const oauthResponse = {
|
|
745
|
+
access_token: tokens.accessToken,
|
|
746
|
+
id_token: tokens.accessToken,
|
|
747
|
+
refresh_token: tokens.refreshToken
|
|
748
|
+
};
|
|
749
|
+
return this.generateLoginResponseFromOAuthResponseV2(oauthResponse);
|
|
750
|
+
};
|
|
743
751
|
this.exchangeOAuthTokens = async body => {
|
|
744
752
|
const data = await this.post(`${_constants2.urls.oauth.v1}/token`, body);
|
|
745
753
|
return this.generateLoginResponseFromOAuthResponse(data);
|
package/node/index.js
CHANGED