-
Notifications
You must be signed in to change notification settings - Fork 10
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
Switched to OAuth2 for CG SaaS #45
Conversation
Codecov Report
@@ Coverage Diff @@
## master #45 +/- ##
=======================================
Coverage 80.26% 80.26%
=======================================
Files 7 7
Lines 1140 1140
=======================================
Hits 915 915
Misses 118 118
Partials 107 107 Continue to review full report at Codecov.
|
octetStream = "application/octet-stream" | ||
libraryVersion = "0.1.0" | ||
defaultBaseURL = "https://api.enterprise.apigee.com" | ||
basicAuthHeader = "Basic ZWRnZWNsaTplZGdlY2xpc2VjcmV0" |
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.
What is this?
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 is the required hard-coded basic auth to fetch the access token. It's a centralized credential.
Ref: https://docs.apigee.com/api-platform/system-administration/management-api-tokens#get-a-new-access-token
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.
Oh, that's wild. Ok, thanks.
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.
Agreed.
The EdgeClient upon construction checks the management host and fetch the OAuth token if it is CG SaaS.
Note: To pass the unit tests, I exported a function from
apigee
package to allow modifying theOAuthURL
. No product issue but open to better solutions.Fix #44