Skip to content

Commit

Permalink
Bump indirect dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltoken committed Dec 9, 2023
1 parent 2d68fd8 commit db7e3b5
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"editor.formatOnSave": true,
"typescript.tsdk": "./node_modules/typescript/lib"
Expand Down
11 changes: 7 additions & 4 deletions test/oauth2-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { MutableRedirectUri } from '../src/lib/types';

import * as testKeys from './keys';
import { verifyTokenWithKey } from './lib/test_helpers';
import { assertIsString } from '../src/lib/helpers';

describe('OAuth 2 service', () => {
let issuer: OAuth2Issuer;
Expand Down Expand Up @@ -682,7 +683,7 @@ describe('OAuth 2 service', () => {
.redirects(0)
.expect(302);

expect(res.headers.location).toBe(postLogoutRedirectUri);
expect(res.headers["location"]).toBe(postLogoutRedirectUri);
});

it('should be able to manipulate url and query params when redirecting within post_logout_redirect_uri', async () => {
Expand All @@ -702,7 +703,7 @@ describe('OAuth 2 service', () => {
.redirects(0)
.expect(302);

expect(res.headers.location).toBe('http://post-logout.com/signin?param=test');
expect(res.headers["location"]).toBe('http://post-logout.com/signin?param=test');
});

it('should expose a token introspection endpoint that returns information about a token', async () => {
Expand Down Expand Up @@ -742,8 +743,10 @@ function getCode(response: request.Response) {
expect(response).toMatchObject({
header: { location: expect.any(String) },
});
const parsed = response as { header: { location: string } };
const url = new URL(parsed.header.location);
const location = response.header["location"];
assertIsString(location, "Undefined location");

const url = new URL(location);
return url.searchParams.get('code');
}

Expand Down
Loading

0 comments on commit db7e3b5

Please sign in to comment.