-
Notifications
You must be signed in to change notification settings - Fork 270
internal/oauthex: add dynamic client registration #519
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
Conversation
ef5aeee to
d4ee5e9
Compare
internal/oauthex/auth_meta.go
Outdated
|
|
||
| // ClientIDIssuedAt is an OPTIONAL timestamp (seconds from 1970 UTC) when | ||
| // the ClientID was issued. | ||
| ClientIDIssuedAt int64 `json:"client_id_issued_at,omitempty"` |
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.
Let's make this and the following time.Times.
It's not too hard to write custom Marshal/UnmarshalJSON methods, using tricks like the one at https://cs.opensource.google/go/x/oauth2/+/refs/tags/v0.31.0:deviceauth.go;l=42.
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.
Done. Hope I did it correctly!
internal/oauthex/auth_meta.go
Outdated
| ClientSecretExpiresAt time.Time `json:"client_secret_expires_at,omitempty"` | ||
| } | ||
|
|
||
| func (r ClientRegistrationResponse) MarshalJSON() ([]byte, error) { |
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.
*Client...
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.
Done
This CL implements https://www.rfc-editor.org/rfc/rfc7591.html
See https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/client/auth.ts as a reference.
For #493