feat(oidc): a fake provider for hosts' tests (testing.dart)

The module's test provider moves into `package:halkyon_oidc_server/testing.dart`,
so a host tests its own sign-in against the module's real checks rather than
a copy: `TestKey` makes and publishes an RSA key and signs ID tokens with
headers written by hand (no `typ`, as SimpleLogin's), and `FakeProvider`
answers discovery, the keys and the token endpoint through an HTTP client
the host hands the module. `FakeProvider.simpleLogin` has SimpleLogin's
issuer and endpoints, without PKCE, as the preset expects; a test now signs
in through the preset end to end. pointycastle, already in the lock through
dart_jsonwebtoken, becomes a dependency for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-23 20:33:13 +02:00
commit 54c0b3f7b8
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -24,11 +24,12 @@ dependencies:
# The providers' discovery documents, keys and token endpoints.
http: ^1.6.0
meta: ^1.16.0
# Makes the RSA keys the fake provider signs its tokens with (`testing.dart`,
# for hosts' tests); dart_jsonwebtoken signs and checks with it too.
pointycastle: ^4.0.0
serverpod: 4.0.4
serverpod_auth_idp_server: 4.0.4
dev_dependencies:
# Makes the RSA keys the tests sign their providers' tokens with.
pointycastle: ^4.0.0
serverpod_test: 4.0.4
test: ^1.25.5