-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add account id to supproted identity providers #3289
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,12 +54,28 @@ namespace Aws | |
| { | ||
| } | ||
|
|
||
| /** | ||
| * Initializes object with accessKeyId, secretKey, sessionToken, expiration date and account Id. | ||
| */ | ||
| AWSCredentials(const Aws::String& accessKeyId, | ||
| const Aws::String& secretKey, | ||
| const Aws::String& sessionToken, | ||
| Aws::Utils::DateTime expiration, | ||
| const Aws::String& accountId) | ||
| : m_accessKeyId(accessKeyId), | ||
| m_secretKey(secretKey), | ||
| m_sessionToken(sessionToken), | ||
| m_expiration(expiration), | ||
| m_accountId(accountId) {} | ||
|
|
||
| bool operator == (const AWSCredentials& other) const | ||
sbiscigl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| return m_accessKeyId == other.m_accessKeyId | ||
| && m_secretKey == other.m_secretKey | ||
| && m_sessionToken == other.m_sessionToken | ||
| && m_expiration == other.m_expiration; | ||
| && m_expiration == other.m_expiration | ||
| && m_accountId == other.m_accountId; | ||
|
|
||
| } | ||
|
|
||
| bool operator != (const AWSCredentials& other) const | ||
|
|
@@ -109,6 +125,14 @@ namespace Aws | |
| return m_expiration; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the underlying account id | ||
| */ | ||
| inline const Aws::String& GetAccountId() const | ||
| { | ||
| return m_accountId; | ||
| } | ||
|
|
||
| /** | ||
| * Sets the underlying access key credential. Copies from parameter accessKeyId. | ||
| */ | ||
|
|
@@ -133,6 +157,14 @@ namespace Aws | |
| m_sessionToken = sessionToken; | ||
| } | ||
|
|
||
| /** | ||
| * Sets the underlying account id. Copies from parameter accountId | ||
| */ | ||
| inline void SetAccountId(const Aws::String& accountId) | ||
| { | ||
| m_accountId = accountId; | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * Sets the underlying access key credential. Copies from parameter accessKeyId. | ||
|
|
@@ -158,6 +190,14 @@ namespace Aws | |
| m_sessionToken = sessionToken; | ||
| } | ||
|
|
||
| /** | ||
| * Sets the underlying account id. Copies from parameter accountId | ||
| */ | ||
| inline void SetAccountId(const char* accountId) | ||
| { | ||
| m_accountId = accountId; | ||
| } | ||
|
|
||
| /** | ||
| * Sets the expiration date of the credential | ||
| */ | ||
|
|
@@ -171,6 +211,7 @@ namespace Aws | |
| Aws::String m_secretKey; | ||
| Aws::String m_sessionToken; | ||
| Aws::Utils::DateTime m_expiration; | ||
| Aws::String m_accountId; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we make this optional. so that its easy to check validity for the new field. Since this is not a required field
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. expiration is optional and we treat it the same way, so i would prefer to treat this the same rather than introduce crt optional to this |
||
| }; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,5 +17,9 @@ namespace smithy { | |
| virtual Aws::Crt::Optional<DateTime> expiration() const { | ||
| return Aws::Crt::Optional<DateTime>(); | ||
| }; | ||
|
|
||
| virtual Aws::Crt::Optional<Aws::String> accountId() const { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not return by const reference?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we return
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's return by value, |
||
| return Aws::Crt::Optional<Aws::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.
The same needs to be extended to AwsCredentialIdentityBase.h and all smithy creds classes for completion
Uh oh!
There was an error while loading. Please reload this page.
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.
we return empty by default in smithy, i dont follow this comment, we only override when it is needed, and it is only needed on AwsCredentialIdentity