@@ -39,15 +39,22 @@ public class SSOImmutableCredentials : ImmutableCredentials
39
39
/// <param name="expiration">The expiration time for the credentials.</param>
40
40
public SSOImmutableCredentials (
41
41
string awsAccessKeyId , string awsSecretAccessKey ,
42
- string token , DateTime expiration )
43
- : base ( awsAccessKeyId , awsSecretAccessKey , token )
42
+ string token , DateTime expiration ) : this ( awsAccessKeyId , awsSecretAccessKey , token , expiration , null )
44
43
{
45
- if ( string . IsNullOrEmpty ( token ) ) throw new ArgumentNullException ( nameof ( token ) ) ;
46
- Expiration = expiration ;
47
44
}
48
45
49
- public SSOImmutableCredentials ( string awsAccessKeyId , string awsSecretAccessKey , string token , DateTime expiration , string accountId ) : this ( awsAccessKeyId , awsSecretAccessKey , token , expiration )
46
+ /// <summary>
47
+ /// Constructs an instance with supplied keys, token, expiration, and account id
48
+ /// </summary>
49
+ /// <param name="awsAccessKeyId"></param>
50
+ /// <param name="awsSecretAccessKey"></param>
51
+ /// <param name="token"></param>
52
+ /// <param name="expiration"></param>
53
+ /// <param name="accountId"></param>
54
+ /// <exception cref="ArgumentNullException"></exception>
55
+ public SSOImmutableCredentials ( string awsAccessKeyId , string awsSecretAccessKey , string token , DateTime expiration , string accountId ) : base ( awsAccessKeyId , awsSecretAccessKey , token )
50
56
{
57
+ if ( string . IsNullOrEmpty ( token ) ) throw new ArgumentNullException ( nameof ( token ) ) ;
51
58
AccountId = accountId ;
52
59
}
53
60
@@ -57,12 +64,12 @@ public SSOImmutableCredentials(string awsAccessKeyId, string awsSecretAccessKey,
57
64
/// <returns>A copy of this object.</returns>
58
65
public new SSOImmutableCredentials Copy ( )
59
66
{
60
- return new SSOImmutableCredentials ( AccessKey , SecretKey , Token , Expiration ) ;
67
+ return new SSOImmutableCredentials ( AccessKey , SecretKey , Token , Expiration , AccountId ) ;
61
68
}
62
69
63
70
public override int GetHashCode ( )
64
71
{
65
- return Hashing . Hash ( AccessKey , SecretKey , Token , Expiration ) ;
72
+ return Hashing . Hash ( AccessKey , SecretKey , Token , Expiration , AccountId ) ;
66
73
}
67
74
68
75
public override bool Equals ( object obj )
0 commit comments