Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public async Task ordercloud_error_should_be_forwarded(bool useKid, int statusCo
};

TestStartup.oc.Me.GetAsync(Arg.Any<string>()).Returns<MeUser>(x => { throw error; });
TestStartup.oc.Certs.GetPublicKeyAsync(Arg.Any<string>()).Returns<PublicKey>(x => { throw error; });
TestStartup.oc.GetPublicKeyAsync(Arg.Any<string>()).Returns<PublicKey>(x => { throw error; });

var result = await request.GetAsync();

Expand Down Expand Up @@ -340,7 +340,7 @@ public async Task user_authorization_is_cached(bool useKid)
// But exactly one request to OrderCloud
if (useKid)
{
await TestStartup.oc.Received(1).Certs.GetPublicKeyAsync(Arg.Any<string>());
await TestStartup.oc.Received(1).GetPublicKeyAsync(Arg.Any<string>());
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
});
var rsaSecurityKey = new RsaSecurityKey(rsa);

var result = new JsonWebTokenHandler().ValidateToken(accessToken, new TokenValidationParameters

Check warning on line 284 in OrderCloud.Catalyst/Auth/UserAuth/RequestAuthenticationService.cs

View workflow job for this annotation

GitHub Actions / Build

'JsonWebTokenHandler.ValidateToken(string, TokenValidationParameters)' is obsolete: '`JsonWebTokens.ValidateToken(string, TokenValidationParameters)` has been deprecated and will be removed in a future release. Use `JsonWebTokens.ValidateTokenAsync(string, TokenValidationParameters)` instead. For more information, see https://aka.ms/IdentityModel/7-breaking-changes'
{
IssuerSigningKey = rsaSecurityKey,
RequireSignedTokens = true,
Expand Down Expand Up @@ -310,7 +310,7 @@
{
throw ex;
}
catch (Exception ex)

Check warning on line 313 in OrderCloud.Catalyst/Auth/UserAuth/RequestAuthenticationService.cs

View workflow job for this annotation

GitHub Actions / Build

The variable 'ex' is declared but never used
{
await _cache.RemoveAsync(cacheKey); // not their fault, don't make them wait 1 hr
return false;
Expand All @@ -325,13 +325,13 @@
{
try
{
return await _oc.Certs.GetPublicKeyAsync(jwt.KeyID);
return await _oc.GetPublicKeyAsync(jwt.KeyID);
}
catch (OrderCloudException ex)
{
throw ex;
}
catch (Exception ex)

Check warning on line 334 in OrderCloud.Catalyst/Auth/UserAuth/RequestAuthenticationService.cs

View workflow job for this annotation

GitHub Actions / Build

The variable 'ex' is declared but never used
{
await _cache.RemoveAsync(cacheKey); // not their fault, don't make them wait 5 min
return null; // null public key will lead to unauthorized exception;
Expand Down
4 changes: 2 additions & 2 deletions OrderCloud.Catalyst/OrderCloud.Catalyst.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>2.8.1</Version>
<Version>2.8.2</Version>
<PackageId>ordercloud-dotnet-catalyst</PackageId>
<Title>OrderCloud SDK Extensions for Azure App Services</Title>
<Authors>OrderCloud Team</Authors>
Expand Down Expand Up @@ -34,7 +34,7 @@
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="7.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OrderCloud.SDK" Version="0.13.5" />
<PackageReference Include="OrderCloud.SDK" Version="0.18.5" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
</ItemGroup>
Expand Down
Loading