Path: redb-identity/tests/redb.Identity.Web.Tests/BackchannelLogoutEndpointTests.cs Snapshot: redb-identity, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-identity Page: https://redbase.app/src/dev-2026-12-06/redb-identity/tests/redb.Identity.Web.Tests/BackchannelLogoutEndpointTests.cs ---- using System.Net; using System.Net.Http; using System.Text; using AwesomeAssertions; using Xunit; namespace redb.Identity.Web.Tests; public sealed class BackchannelLogoutEndpointTests : IClassFixture { private readonly WebHostFixture _factory; public BackchannelLogoutEndpointTests(WebHostFixture factory) { _factory = factory; } [Fact] public async Task Post_bcl_sink_without_token_returns_400() { var client = _factory.CreateClient(); var content = new StringContent("", Encoding.UTF8, "application/x-www-form-urlencoded"); var resp = await client.PostAsync("/bcl/sink", content); resp.StatusCode.Should().Be(HttpStatusCode.BadRequest); } [Fact] public async Task Post_bcl_sink_with_invalid_token_does_not_succeed() { var client = _factory.CreateClient(); var content = new FormUrlEncodedContent(new[] { new KeyValuePair("logout_token", "not-a-real-jwt"), }); var resp = await client.PostAsync("/bcl/sink", content); // Invalid JWT must NOT succeed. // 400 = endpoint validated and rejected; // 500 = couldn't even fetch signing keys (test fixture has unreachable authority — also a valid rejection). resp.StatusCode.Should().BeOneOf(HttpStatusCode.BadRequest, HttpStatusCode.InternalServerError); } }