mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 07:13:29 +00:00
Merge branch 'wave/v124-ewe-oauth' into release/v1.24.0
This commit is contained in:
commit
391c78674e
6 files changed
+65
No files matched your search
@@ -230,6 +230,12 @@ describe("metadata + audience", () => {
|
||||
expect(as.grant_types_supported).toContain("refresh_token");
|
||||
});
|
||||
|
||||
it("AS metadata advertises the RFC 9207 iss parameter and a matching issuer", () => {
|
||||
const as = authorizationServerMetadata();
|
||||
expect(as.authorization_response_iss_parameter_supported).toBe(true);
|
||||
expect(as.issuer).toBe("https://health.example");
|
||||
});
|
||||
|
||||
it("the WWW-Authenticate challenge points at the PRM", () => {
|
||||
expect(wwwAuthenticateChallenge()).toMatch(
|
||||
/resource_metadata="https:\/\/health\.example\/\.well-known\/oauth-protected-resource"/,
|
||||
|
||||
@@ -42,6 +42,7 @@ export interface AuthorizationServerMetadata {
|
||||
token_endpoint_auth_methods_supported: string[];
|
||||
code_challenge_methods_supported: string[];
|
||||
client_id_metadata_document_supported: boolean;
|
||||
authorization_response_iss_parameter_supported: boolean;
|
||||
}
|
||||
|
||||
/** RFC 9728 — the Protected Resource Metadata for the `/mcp` resource. */
|
||||
@@ -76,6 +77,11 @@ export function authorizationServerMetadata(
|
||||
code_challenge_methods_supported: ["S256"],
|
||||
// CIMD is the preferred registration path (SEP-991); DCR is the fallback.
|
||||
client_id_metadata_document_supported: true,
|
||||
// RFC 9207 — the authorization response carries an `iss` parameter the
|
||||
// client validates against this metadata's `issuer`, so a code from a
|
||||
// look-alike AS in a multi-AS deployment cannot be substituted (mix-up
|
||||
// defence). The `/authorize` redirect always includes it.
|
||||
authorization_response_iss_parameter_supported: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user