-
Notifications
You must be signed in to change notification settings - Fork 143
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
add support for dpop #454
add support for dpop #454
Conversation
6a60a26
to
c59cca2
Compare
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.
Seems like there sound be a README update or other documentation for this feature.
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.
I see templates have been modified, but the actual client needs to be included to the PR? Also, make sure you're sending isDPoP: true (check tech design doc for user-agent details) via user-agent for tracking purposes.
I agree we should update the readme with at least a note that the SDK supports DPoP?
.generator/templates/client.mustache
Outdated
a.req.Header.Add("Authorization", "Bearer "+accessToken.(string)) | ||
nonce, hasNonce := a.tokenCache.Get(DpopAccessTokenNonce) | ||
if !hasNonce { | ||
a.req.Header.Add("Authorization", "Bearer "+accessToken.(string)) |
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.
Nit: Maybe we can do the same as in line 198 and get the token type from the cache instead of hardcoding?
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.
The risk of it is too many item getting cached and failure to retrieve token type despite everything else available is not something I would want. Obviously the argument for it will changed when there are more token type coming, but I think for now this should suffice
c59cca2
to
22dffec
Compare
I have added the user-agent header. In go, we only need to check in the template. The codegen will be done by github action |
22dffec
to
12f6ce5
Compare
@@ -934,6 +934,8 @@ When using a keypair, you won't need an API Token because the SDK will | |||
request an access token for you. In order to use OAuth 2.0, construct a client | |||
instance by passing the following parameters: | |||
|
|||
OAuth 2.0 flow is now support Dpop |
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.
OAuth 2.0 flow is now support Dpop | |
OAuth 2.0 flow now supports [DPoP](https://developer.okta.com/docs/guides/dpop/main/) |
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.
Minor suggestion - LGTM
Summary
Fixes #
Type of PR
Test Information
Go Version:
Os Version:
OpenAPI Spec Version:
Signoff
make fmt
on my code