-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,101 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.Runtime; | ||
|
||
namespace AWS.Deploy.CLI | ||
{ | ||
/// <inheritdoc /> | ||
public class AWSCredentialsFactory : IAWSCredentialsFactory | ||
{ | ||
/// <inheritdoc /> | ||
public AWSCredentials Create() | ||
{ | ||
return FallbackCredentialsFactory.GetCredentials(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.Runtime.CredentialManagement; | ||
|
||
namespace AWS.Deploy.CLI | ||
{ | ||
/// <inheritdoc /> | ||
public class CredentialProfileStoreChainFactory : ICredentialProfileStoreChainFactory | ||
{ | ||
/// <inheritdoc /> | ||
public CredentialProfileStoreChain Create() | ||
{ | ||
return new CredentialProfileStoreChain(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.Runtime; | ||
|
||
namespace AWS.Deploy.CLI | ||
{ | ||
/// <summary> | ||
/// Represents a factory for creating <see cref="AWSCredentials"> | ||
/// </summary> | ||
public interface IAWSCredentialsFactory | ||
{ | ||
/// <summary> | ||
/// Creates <see cref="AWSCredentials"> | ||
/// </summary> | ||
AWSCredentials Create(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.Runtime.CredentialManagement; | ||
|
||
namespace AWS.Deploy.CLI | ||
{ | ||
/// <summary> | ||
/// Represents a factory for creating <see cref="CredentialProfileStoreChain"> | ||
/// </summary> | ||
public interface ICredentialProfileStoreChainFactory | ||
{ | ||
/// <summary> | ||
/// Creates a <see cref="CredentialProfileStoreChain"> | ||
/// </summary> | ||
CredentialProfileStoreChain Create(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.Runtime.CredentialManagement; | ||
|
||
namespace AWS.Deploy.CLI | ||
{ | ||
/// <summary> | ||
/// Represents a factory for creating <see cref="SharedCredentialsFile"> | ||
/// </summary> | ||
public interface ISharedCredentialsFileFactory | ||
{ | ||
/// <summary> | ||
/// Creates <see cref="SharedCredentialsFile"> | ||
/// </summary> | ||
SharedCredentialsFile Create(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.Runtime.CredentialManagement; | ||
|
||
namespace AWS.Deploy.CLI | ||
{ | ||
/// <inheritdoc /> | ||
public class SharedCredentialsFileFactory : ISharedCredentialsFileFactory | ||
{ | ||
/// <inheritdoc /> | ||
public SharedCredentialsFile Create() | ||
{ | ||
return new SharedCredentialsFile(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
test/AWS.Deploy.CLI.UnitTests/AWSCredentialsFactoryTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using Amazon.Runtime; | ||
using Xunit; | ||
|
||
namespace AWS.Deploy.CLI.UnitTests | ||
{ | ||
public class AWSCredentialsFactoryTests | ||
{ | ||
[Fact] | ||
public void Create_ReturnsAWSCredentialsInstance() | ||
{ | ||
// Arrange | ||
var factory = new AWSCredentialsFactory(); | ||
|
||
// Act | ||
var result = factory.Create(); | ||
|
||
// Assert | ||
Assert.NotNull(result); | ||
Assert.IsAssignableFrom<AWSCredentials>(result); | ||
} | ||
} | ||
} |
Oops, something went wrong.