-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support passing ClientConfiguration to SSOCredentialsProvider. #2860
Conversation
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.
Sorry once again for missing this one. Looks good besides the two comments I left, if those are addressed we can prioritize getting this in.
src/aws-cpp-sdk-core/source/auth/bearer-token-provider/SSOBearerTokenProvider.cpp
Show resolved
Hide resolved
c4c4559
to
153fdff
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.
should be good after you fix this for the msvc build
AWS_LOGSTREAM_INFO(SSO_CREDENTIALS_PROVIDER_LOG_TAG, "Setting sso credentials provider to read config from " << m_profileToUse); | ||
} | ||
|
||
SSOCredentialsProvider::SSOCredentialsProvider(const Aws::String& profile, std::shared_ptr<const Client::ClientConfiguration> config) : |
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.
MSVC CI build isnt liking Client::ClientConfiguration
C:/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/SSOCredentialsProvider.cpp(39): error C2653: 'Client': is not a class or namespace name (compiling source file C:\aws-cpp-sdk-core\ub_core.cpp)
C:/aws-sdk-cpp/src/aws-cpp-sdk-core/source/auth/bearer-token-provider/SSOBearerTokenProvider.cpp(38): error C2653: 'Client': is not a class or namespace name (compiling source file C:\aws-cpp-sdk-core\ub_core.cpp)
Gotta make it Aws:Client::ClientConfiguration
in both SSOCredentialsProvider
and SSOBearerTokenProvider
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.
Fixed.
a046a6c
to
fa6fb75
Compare
fa6fb75
to
27f6d0e
Compare
Issue #, if available:
Description of changes:
This PR adds a constructor overload to
SSOCredentialsProvider
that allows passing a pointer to aClientConfiguration
object. This is necessary for scenarios like specifying custom CA certificates or custom retry policies.I also slightly restructured the code to not rely on the
ClientConfig
to pass options like the region or the scheme, passing them instead as separate parameters.Let me know how I should test this.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.