Skip to content

Commit 0f8017f

Browse files
authored
Merge pull request #255 from tank104/AddRefreshTokenToMWSTokenExchange
2 parents f9fea98 + 5f87799 commit 0f8017f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Source/FikaAmazonAPI/Services/AuthorizationService.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,20 @@ public async Task<TokenResponse> GetAccessTokenFromCodeAsync(string code, string
2929
{
3030
return await TokenGeneration.GetAccessTokenFromCodeAsync(AmazonCredential.ClientId, AmazonCredential.ClientSecret, code, appRedirectUri);
3131
}
32+
33+
public async Task<TokenResponse> GetRrefreshTokenFromCodeAsync(string code, string appRedirectUri)
34+
{
35+
return await TokenGeneration.GetAccessTokenFromCodeAsync(AmazonCredential.ClientId, AmazonCredential.ClientSecret, code, appRedirectUri, grant_type: "authorization_code");
36+
}
37+
3238
public static async Task<TokenResponse> GetAccessTokenFromCodeAsync(string clientId, string clientSecret, string code, string appRedirectUri)
3339
{
3440
return await TokenGeneration.GetAccessTokenFromCodeAsync(clientId, clientSecret, code, appRedirectUri);
3541
}
42+
43+
public static async Task<TokenResponse> GetRefreshTokenFromCodeAsync(string clientId, string clientSecret, string code, string appRedirectUri)
44+
{
45+
return await TokenGeneration.GetAccessTokenFromCodeAsync(clientId, clientSecret, code, appRedirectUri, grant_type: "authorization_code");
46+
}
3647
}
3748
}

0 commit comments

Comments
 (0)