Skip to content

Commit

Permalink
fix: Add solid_oidc_supported to openid config
Browse files Browse the repository at this point in the history
* fix: added solid_oidc_supported to openid config

* test: fixed coverage

* chore: moved solid_oidc_supported to config discovery
  • Loading branch information
lem-onade committed Jun 18, 2021
1 parent 478a915 commit b328f9a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/identity/configuration/KeyConfigurationFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ export class KeyConfigurationFactory implements ConfigurationFactory {
token: this.createRoute('token'),
userinfo: this.createRoute('me'),
},
discovery: {
solid_oidc_supported: 'https://solidproject.org/TR/solid-oidc',
},
};
}
}
10 changes: 10 additions & 0 deletions test/integration/Identity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,14 @@ describe('A Solid server with IDP', (): void => {
expect(res.status).toBe(205);
});
});

describe('openid-configuration', (): void => {
it('should contain solid_oidc_supported key.', async(): Promise<void> => {
const res = await fetch(`${baseUrl}.well-known/openid-configuration`);
const jsonBody = await res.json();

expect(res.status).toBe(200);
expect(jsonBody.solid_oidc_supported).toEqual('https://solidproject.org/TR/solid-oidc');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ function getExpected(adapter: any, cookieKeys: any, jwks: any): any {
token: '/foo/idp/token',
userinfo: '/foo/idp/me',
},
discovery: {
solid_oidc_supported: 'https://solidproject.org/TR/solid-oidc',
},
};
}

Expand Down

0 comments on commit b328f9a

Please sign in to comment.