-
Notifications
You must be signed in to change notification settings - Fork 2
ENG-31: Solid-OIDC Client Id Document support #17
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
base: main
Are you sure you want to change the base?
Changes from all commits
818404c
58741de
6582061
9f1e4a3
e2b3203
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "token_endpoint_auth_method": "none", | ||
| "client_id": "http://localhost:8080/id.jsonld", | ||
| "redirect_uris": [ | ||
| "http://localhost:8080/callback.html" | ||
| ], | ||
| "response_types": [ | ||
| "code" | ||
| ], | ||
| "@context": "https://www.w3.org/ns/solid/oidc-context.jsonld" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import type { ClientProvider } from "./ClientProvider.js" | ||
| import * as oauth from "oauth4webapi" | ||
|
|
||
| export class ClientIdClientProvider implements ClientProvider { | ||
| constructor(private clientIdDocUri: URL) { | ||
| } | ||
|
|
||
| async getClient(_: oauth.AuthorizationServer, __: string, signal: AbortSignal): Promise<oauth.Client> { | ||
| const response = await fetch(this.clientIdDocUri, {signal}) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like it will get overriden when we are monkey patching and so suffer from the issues that #21 tries to fix.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, relying on the global I imagine the best approach would be (as hinted in #21) would be for our API to take a fetch and perhaps for the manager to pass its original fetch to these methods. Even regardless of not monkey patching. |
||
| return await response.json() | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have things commented out in a PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
index.htmlfile is what currently goes for test/demo harness.These commented lines facilitate experimentation with the new feature.
This is far from done, to be replaced down the line with unit tests, documentation comments and example code.
Would you like me to remove here or are you OK for this to evolve slowly?