-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: removed unused Support Token functionality
- Loading branch information
Salvatore Laiso
committed
Oct 23, 2024
1 parent
ad9f8e9
commit 16bd993
Showing
7 changed files
with
0 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,6 @@ const aLastname = "Rossi" as NonEmptyString; | |
const aFiscalCode = "AAAAAAAAAAAAAAA" as FiscalCode; | ||
const anEmailAddress = "[email protected]" as EmailString; | ||
const aSharedSecret = "ASHAREDSECRET123" as NonEmptyString; | ||
const aPrivateRsaKey = `-----BEGIN RSA PRIVATE KEY----- | ||
MIIBOgIBAAJBAPX91rBDbLk5Pr0/lf4y1a8oz75sYa+slTqpfVHUrYb22qy4rY6Z | ||
B0rXvTeLPgCAXUfGFJu4qSJcbu7yhBrPx30CAwEAAQJBALRCvEVUU2L0IRabdvXd | ||
GJuP45ReZcNPS9e+BhimKjcgVFmyrpmiItNBHKFyTM8uL8dHXen1ReUgZOHcPKpV | ||
MF0CIQD8KxN+ZhrxPIMPEJJJOO/Pn4y3iZRowulkaFDFUMUzzwIhAPm6vD95LAJW | ||
DyC2relGDbA6h/YrBg38fcr1KQgxe0bzAiAcUL30oIR/+BqDU4oJnNIYz0KezV0T | ||
0mcgtjHzphkuswIgXbRK1IpUECBYls7VHNXTZw/fWmg0YmUeklxBZDik6C8CIBXl | ||
niQ7qszA7Uel9+wv2DwzWj+8OUcRzJAGOVD8cy2S | ||
-----END RSA PRIVATE KEY-----` as NonEmptyString; | ||
const tokenTtl = 60 as Second; | ||
const aTokenIssuer = "ISSUER" as NonEmptyString; | ||
|
||
|
@@ -56,32 +47,6 @@ describe("TokenService#getNewTokenAsync", () => { | |
}); | ||
}); | ||
|
||
describe("TokenService#getSupportToken", () => { | ||
it("should generate a new support token", async () => { | ||
// generate new token | ||
const tokenService = new TokenService(); | ||
const errorOrNewJwtToken = await tokenService.getJwtSupportToken( | ||
aPrivateRsaKey, | ||
aFiscalCode, | ||
tokenTtl, | ||
aTokenIssuer | ||
)(); | ||
expect(E.isRight(errorOrNewJwtToken)).toBeTruthy(); | ||
}); | ||
|
||
it("should return an error if an error occurs during token generation", async () => { | ||
// generate new token | ||
const tokenService = new TokenService(); | ||
const errorOrNewJwtToken = await tokenService.getJwtSupportToken( | ||
"aPrivateRsaKey" as NonEmptyString, | ||
aFiscalCode, | ||
tokenTtl, | ||
aTokenIssuer | ||
)(); | ||
expect(E.isLeft(errorOrNewJwtToken)).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
describe("TokenService#getJwtMitVoucherToken", () => { | ||
it("should generate a token for mit voucher", async () => { | ||
// generate new token | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters