Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#143] Test token renewal in middleware #146

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/test/controller/http/middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ describe('Test middleware', () => {
.get(`${baseUrl}/authRequired`)
.set(
'Authorization',
'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InRlc3QifQ.eyJpc3MiOiJtb3ZpZS1yZWl2ZXctY29tbWVudCIsImlhdCI6MTcwNDAzNjQ5MywibmJmIjoxNzA0MDM2NDkzLCJleHAiOjE3MDY2Mjg0OTMsInVzZXJJZCI6IjU3Y2YyN2Q4LTBjNzQtNDk2My05NGE3LTQ3YzM1NzQxZWQwNiIsIm5pY2tuYW1lIjoi64-E7KCE7KCB7J24IO2PieuhoOqwgCDsl7DrkZDruZsg7ZWY66eIIiwidGFnIjoiI0FaN0oiLCJpZHAiOiJHT09HTEUiLCJlbWFpbCI6ImRvd2hhdHlvdXdhbnQwNzI0QGdtYWlsLmNvbSIsImFjY2Vzc0xldmVsIjoiVVNFUiJ9.NX10zbQRCNr-38tGeqV_nBx5VDqTC0uj3k15QuWQYbgBvZh1yIJp3PqmnEuXuuc8Jbm5HZC3p_exVopgAXLLfMqkleNOBh1KB46yQAeJEzl1H-LWPHGRHks_pGaSg0E2irqUCOsCnVAuzkYTefCnsQy7dXamsRr7g9pRppFyRyjzDWY1r5HsEiIw77GUNOZ31f87PkLTJaQHfBvXm5fyS541IIKXMkH_7DaoSjUBTPZOBpPGg3q9hjTbKn2mkESC8Y4E9KFlX9UwoTRtKFI8QaBPYPYvL4ZuKD1pJCEj7nbT0NPnRcC0M6eI0tIDHbTSbMDbSE-HZZrcwn9WYPVqNg'
'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InRlc3QifQ.eyJpc3MiOiJtb3ZpZS1yZWl2ZXctY29tbWVudCIsImlhdCI6MTcwNjYzMTcyMCwibmJmIjoxNzA2NjMxNzIwLCJleHAiOjQ4NjIzMDUzMjAsInVzZXJJZCI6ImZjOGUwNTkyLWMyNmEtNGMwOS05ZGY2LWUyNWE2ZjA0Yjg5MiIsIm5pY2tuYW1lIjoi7ZuM66Wt7ZWcIOyLnOuEpO2VhCDstIjroZ3sg4kg64uk656M7KWQIiwidGFnIjoiI1pKNzAiLCJpZHAiOiJHT09HTEUiLCJlbWFpbCI6ImRvd2hhdHlvdXdhbnQwNzI0QGdtYWlsLmNvbSIsImFjY2Vzc0xldmVsIjoiVVNFUiJ9.DOTaPkL_-KL6s81Syfk98rc552e6Cj44yfZUta3VqSBYjbk5PxPI2I45egvIv0k1bQPWhPhsZxTXGr-JD4HTlJO3bxnUYlXgKfcpxc7Q4tnpCpHUozOexXRukNECvWVUhPaxcRWAGODYoF0hkefXNvQbT3Po3hQ_YOEHsQCxl15xq8ujowJg86C6w_xSwdM6be51Lng1vdVP9StotWpft6AaomTNboB1Mg8Acl-7XvdWEhDW30lV52fIFJKZn_rrutcenHHvZD60erG0GycnK5-nPBKNv9KCu1H8uWbg3iUcCC-HrRc5a6oxbDgyhGaMg1h3b32yHczVlqehodMMvQ'
)
.expect(200);

Expand All @@ -281,7 +281,7 @@ describe('Test middleware', () => {
.get(`${baseUrl}/authRequired`)
.set(
'Cookie',
`${idTokenCookieName}=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InRlc3QifQ.eyJpc3MiOiJtb3ZpZS1yZWl2ZXctY29tbWVudCIsImlhdCI6MTcwNDAzNjQ5MywibmJmIjoxNzA0MDM2NDkzLCJleHAiOjE3MDY2Mjg0OTMsInVzZXJJZCI6IjU3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