-
Notifications
You must be signed in to change notification settings - Fork 95
feat(docs): add documentation for HTTP OAuth #1805
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
✅ Deploy Preview for polite-licorice-3db33c ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary of ChangesHello @thisthat, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces comprehensive documentation for configuring HTTP OAuth authentication within Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds documentation for using OAuth with the HTTP sync provider. The documentation is a good addition, but I've found a couple of issues: a typo and inconsistent parameter naming in the description, and an inconsistent data type in a code example. My review includes suggestions to correct these for better clarity and accuracy.
alexandraoberaigner
left a comment
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.
Docs which are easy to understand 😎 👍 added just some nits/thoughts
<!-- Please use this template for your pull request. --> <!-- Please use the sections that you need and delete other sections --> ## This PR - adds support for OAuth in the HTTP Sync ### Related Issues <!-- add here the GitHub issue that this PR resolves if applicable --> Addresses #1785 ### Notes Properly testing this via unit tests is not possible. The HTTP Sync is built by the `syncbuilder` pkg. This entails that testing any behavior of the HTTP Sync can only be possible as part of the `syncbuilder` module, which IMHO doesn't make much sense. ### Follow-up Tasks Add documentation for the new properties used in the HTTP Sync. Available here: #1805 ### How to test <!-- if applicable, add testing instructions under this section --> Manually create a small mockup server that handles OAuth requests ```go func (h *OAuthHandler) Authorize(w http.ResponseWriter, r *http.Request) { reqDump, _ := httputil.DumpRequest(r, true) fmt.Printf("GOT OAUTH REQUEST:\n%s", string(reqDump)) w.WriteHeader(http.StatusOK) w.Header().Set("Content-Type", "application/x-www-form-urlencoded") w.Write([]byte("access_token=mocktoken&scope=mockscope&token_type=bearer")) } ``` Afterwards, start flagd pointing to the mockup server: ``` go run main.go start --sources='[{ "uri": "http://localhost:8180/flags", "provider": "http", "interval": 1, "bearerToken": "it-will-be-overridden", "oauthConfig": { "clientID": "test", "clientSecret": "test", "tokenUrl": "http://localhost:8180/oauth" }}]' ``` The HTTP request to `http://localhost:8180/flags` will contain the HTTP Header `Authorization: Bearer mocktoken`. --------- Signed-off-by: Todd Baert <[email protected]> Signed-off-by: Giovanni Liva <[email protected]> Signed-off-by: Simon Schrottner <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Todd Baert <[email protected]> Co-authored-by: Simon Schrottner <[email protected]> Co-authored-by: chrfwow <[email protected]>
Signed-off-by: Giovanni Liva <[email protected]>
Signed-off-by: Giovanni Liva <[email protected]>
Signed-off-by: Giovanni Liva <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner <[email protected]>
Co-authored-by: alexandraoberaigner <[email protected]> Signed-off-by: Giovanni Liva <[email protected]>
Co-authored-by: alexandraoberaigner <[email protected]> Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: alexandraoberaigner <[email protected]> Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
This PR
Related Issues
Fixes #1785