version: 1.0.30 #1

Merged
leandro merged 18 commits from development into master 2025-06-27 20:36:01 +00:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 36c32f1433 - Show all commits

View file

@ -8,7 +8,7 @@ const mockedAxios = axios as jest.Mocked<typeof axios>;
const apiUrl = "https://myapi.com"; const apiUrl = "https://myapi.com";
const authUrl = "https://auth.myapi.com/oauth/token"; const authUrl = "https://auth.myapi.com/oauth/token";
const clientId = "testClientdId"; const clientId = "testClientId";
const clientSecret = "testClientSecret"; const clientSecret = "testClientSecret";
const baseClientParams = { apiUrl, authUrl, clientId, clientSecret }; const baseClientParams = { apiUrl, authUrl, clientId, clientSecret };
const basicAuth = `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString("base64")}`; const basicAuth = `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString("base64")}`;
@ -23,13 +23,13 @@ describe("Get Access Token", () => {
mockedAxios.request.mockResolvedValueOnce({ data: mockedAccessToken }); mockedAxios.request.mockResolvedValueOnce({ data: mockedAccessToken });
}); });
it("Shoud Get with Standard Config", async () => { it("Should Get with Standard Config", async () => {
const cli = getOauthClient(); const cli = getOauthClient();
await accessTokenValidator(cli); await accessTokenValidator(cli);
validateDefaultGetAccessToken(); validateDefaultGetAccessToken();
}); });
it("Shoud Get with Custom Auth Header", async () => { it("Should Get with Custom Auth Header", async () => {
const cli = getOauthClient({ const cli = getOauthClient({
...baseClientParams, ...baseClientParams,
authHeaderName: "CustomAuthorizationHeader", authHeaderName: "CustomAuthorizationHeader",
@ -48,7 +48,7 @@ describe("Get Access Token", () => {
); );
}); });
it("Shoud Get with Custom Grant Type", async () => { it("Should Get with Custom Grant Type", async () => {
const cli = getOauthClient({ const cli = getOauthClient({
...baseClientParams, ...baseClientParams,
grantType: "PermissaoCustom", grantType: "PermissaoCustom",
@ -67,7 +67,7 @@ describe("Get Access Token", () => {
); );
}); });
it("Shoud Get with Custom Auth Scope", async () => { it("Should Get with Custom Auth Scope", async () => {
const cli = getOauthClient({ const cli = getOauthClient({
...baseClientParams, ...baseClientParams,
authScope: "EscopoCustom", authScope: "EscopoCustom",
@ -86,7 +86,7 @@ describe("Get Access Token", () => {
); );
}); });
it("Shoud Get with Credentials on Request body", async () => { it("Should Get with Credentials on Request body", async () => {
const cli = getOauthClient({ const cli = getOauthClient({
...baseClientParams, ...baseClientParams,
authContentType: contentTypeApplicationJson, authContentType: contentTypeApplicationJson,

View file

@ -1,6 +1,6 @@
{ {
"name": "lhisp-oauth-client-dev", "name": "lhisp-oauth-client-dev",
"version": "1.0.29", "version": "1.0.20",
"main": "src/index", "main": "src/index",
"types": "src/index.d.ts", "types": "src/index.d.ts",
"repository": { "repository": {