Skip to content

Commit 81785c5

Browse files
authored
Merge pull request #677 from abuzuhri/NewAuthorization
Remove AWS authorization
2 parents c53bf3c + 0f44bc7 commit 81785c5

File tree

10 files changed

+58
-455
lines changed

10 files changed

+58
-455
lines changed

Source/FikaAmazonAPI.SampleCode/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ static async Task Main(string[] args)
1717

1818
AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
1919
{
20-
AccessKey = config.GetSection("FikaAmazonAPI:AccessKey").Value,
21-
SecretKey = config.GetSection("FikaAmazonAPI:SecretKey").Value,
22-
RoleArn = config.GetSection("FikaAmazonAPI:RoleArn").Value,
20+
//AccessKey = config.GetSection("FikaAmazonAPI:AccessKey").Value,
21+
//SecretKey = config.GetSection("FikaAmazonAPI:SecretKey").Value,
22+
//RoleArn = config.GetSection("FikaAmazonAPI:RoleArn").Value,
2323
ClientId = config.GetSection("FikaAmazonAPI:ClientId").Value,
2424
ClientSecret = config.GetSection("FikaAmazonAPI:ClientSecret").Value,
2525
RefreshToken = config.GetSection("FikaAmazonAPI:RefreshToken").Value,
@@ -29,8 +29,8 @@ static async Task Main(string[] args)
2929
});
3030

3131

32-
//FeedsSample feedsSample = new FeedsSample(amazonConnection);
33-
//feedsSample.SubmitFeedPRICING(69.3F, "8809606851663");
32+
FeedsSample feedsSample = new FeedsSample(amazonConnection);
33+
feedsSample.SubmitFeedPRICING(69.3F, "8809606851663");
3434

3535
var feeds = amazonConnection.Feed.GetFeeds(new Parameter.Feed.ParameterGetFeed()
3636
{

Source/FikaAmazonAPI/AmazonConnection.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,13 @@ private void ValidateCredentials(AmazonCredential Credentials)
149149
{
150150
if (Credentials == null)
151151
throw new AmazonUnauthorizedException($"Error, you cannot make calls to Amazon without credentials!");
152-
else if (string.IsNullOrEmpty(Credentials.AccessKey))
153-
throw new AmazonInvalidInputException($"InvalidInput, AccessKey cannot be empty!");
154-
else if (string.IsNullOrEmpty(Credentials.SecretKey))
155-
throw new AmazonInvalidInputException($"InvalidInput, SecretKey cannot be empty!");
156-
else if (string.IsNullOrEmpty(Credentials.RoleArn))
157-
throw new AmazonInvalidInputException($"InvalidInput, RoleArn cannot be empty!");
152+
//Remove AWS authorization
153+
//else if (string.IsNullOrEmpty(Credentials.AccessKey))
154+
// throw new AmazonInvalidInputException($"InvalidInput, AccessKey cannot be empty!");
155+
//else if (string.IsNullOrEmpty(Credentials.SecretKey))
156+
// throw new AmazonInvalidInputException($"InvalidInput, SecretKey cannot be empty!");
157+
//else if (string.IsNullOrEmpty(Credentials.RoleArn))
158+
// throw new AmazonInvalidInputException($"InvalidInput, RoleArn cannot be empty!");
158159
else if (string.IsNullOrEmpty(Credentials.ClientId))
159160
throw new AmazonInvalidInputException($"InvalidInput, ClientId cannot be empty!");
160161
else if (string.IsNullOrEmpty(Credentials.ClientSecret))

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Token/AWSAuthenticationTokenData.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
using FikaAmazonAPI.AmazonSpApiSDK.Runtime;
2-
using System;
1+
using System;
32

43
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Token
54
{
65
public class AWSAuthenticationTokenData
76
{
8-
public AWSAuthenticationCredentials AWSAuthenticationCredential { get; set; }
7+
//public AWSAuthenticationCredentials AWSAuthenticationCredential { get; set; }
98
public string SessionToken { get; set; }
109
public DateTime Expiration { get; set; }
1110

Source/FikaAmazonAPI/AmazonSpApiSDK/Runtime/AWSAuthenticationCredentials.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

Source/FikaAmazonAPI/AmazonSpApiSDK/Runtime/AWSSigV4Signer.cs

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)