-
Notifications
You must be signed in to change notification settings - Fork 916
Refactors credential identity with separate implementing classes #4024
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
Refactors credential identity with separate implementing classes #4024
Conversation
.add("accessKeyId", accessKeyId) | ||
.build(); | ||
} | ||
interface Builder { |
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.
extends CopyableBuilder
?
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 didn't think it was necessarily needed, but we can add it.
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 played around with different versions of CopyableBuilder, but it doesn't work for the subtypes. If AwsCredentialsIdentity
implements ToCopyableBuilder
the returned builder will be of type AwsCredentialsIdentity.Builder
for AwsSessionCredentialsIdentity
too and you'll lose the specific information in the subtype.
|
||
@Override | ||
public String toString() { | ||
return ToString.builder("AwsCredentialsIdentity") |
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.
AwsSessionCredentialsIdentity?
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.
:-) yep
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.
LG. Thanks for adding tests I didn't initially!
return hashCode; | ||
} | ||
|
||
static final class Builder implements AwsCredentialsIdentity.Builder { |
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 these could be private?
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.
yes, that'd be better
SonarCloud Quality Gate failed.
|
…) (#4028) * refactors credential identity to create separate classes
…) (#4028) * refactors credential identity to create separate classes
…5119) * Adds account ID as a built-in endpoint parameter (#4016) * Refactors credential identity with separate implementing classes (#4024) (#4028) * Adds accountId as a parameter to AWS credentials identity (#4029) * Adds accountId to STS credentials providers (#4040) * Adding accountId support to environment variable credential provider (#4327) * Adds accountId support to process credentials provider (#4332) * Adds account ID support for profile credentials provider sources (#4340) * Adds accountId endpoint mode (#4984) * Adding back existing endpoint files (#5120) * changelog (#5121)
…ws#5119) * Adds account ID as a built-in endpoint parameter (aws#4016) * Refactors credential identity with separate implementing classes (aws#4024) (aws#4028) * Adds accountId as a parameter to AWS credentials identity (aws#4029) * Adds accountId to STS credentials providers (aws#4040) * Adding accountId support to environment variable credential provider (aws#4327) * Adds accountId support to process credentials provider (aws#4332) * Adds account ID support for profile credentials provider sources (aws#4340) * Adds accountId endpoint mode (aws#4984) * Adding back existing endpoint files (aws#5120) * changelog (aws#5121)
Motivation and Context
The new
AwsCredentialsIdentity
andAwsSessionCredentialsIdentity
interfaces have inline classes that implement the interface. This PR extracts these inline classes and adds builder support for the identity interfaces in order to support future additional parameters.