Skip to content

Commit 6940f9e

Browse files
Lanning, MarkLanning, Mark
authored andcommitted
added new unit test
1 parent 82fd5e6 commit 6940f9e

File tree

2 files changed

+6
-2
lines changed
  • ItemStore/tests/ThingsLibrary.ItemStore.Tests
  • Services/src/ThingsLibrary.Services.AspNetCore/Extensions

2 files changed

+6
-2
lines changed

ItemStore/tests/ThingsLibrary.ItemStore.Tests/UnitTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ public async Task Test_InsertQueryableFetch()
221221
// ======================================================================
222222
// VERIFY
223223
Assert.HasCount(3, envelopes2);
224+
225+
// try to get a specific item by tag
226+
var envelopeList = await ItemStore.GetAllAsync(x => x.Partition == partitionKey && x.Data.Tags["release_theaters"] == "3854", UnitTests.CancellationToken);
227+
Assert.HasCount(1, envelopeList);
224228
}
225229

226230
}

Services/src/ThingsLibrary.Services.AspNetCore/Extensions/CanvasAuth.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public static void AddCanvasAuthorization(this IServiceCollection services, Auth
277277
// ================================================================================
278278
// REQUIRE EVERYONE TO LOGIN
279279
// By default, all incoming requests will be authorized according to the default policy.
280-
options.FallbackPolicy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build(); //options.DefaultPolicy;
280+
//options.FallbackPolicy = new AuthorizationPolicyBuilder().RequireAuthenticatedUser().Build(); //options.DefaultPolicy;
281281
});
282282
}
283283

@@ -300,7 +300,7 @@ public static void AddCanvasAuthJwt(this IServiceCollection services, Authentica
300300
if (!jwtOptions.Tags.GetValue<bool>("disable_validation", false))
301301
{
302302
Log.Debug("--- Issuer: {JwtIssuer}", (!string.IsNullOrEmpty(jwtOptions["issuer"]) ? jwtOptions["issuer"] : "<< ANY >>"));
303-
Log.Debug("--- Audience: {JwtAudience}", (!string.IsNullOrEmpty(jwtOptions["audience"]) ? jwtOptions["audience"] : "<< ANY >>"));
303+
Log.Debug("--- Audience: {JwtAudience}", (!string.IsNullOrEmpty(jwtOptions["audiences"]) ? jwtOptions["audiences"] : "<< ANY >>"));
304304
}
305305
else
306306
{

0 commit comments

Comments
 (0)