mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-31 15:27:37 +00:00
fix(verifayda): format nested Fayda address objects into strings
This commit is contained in:
@@ -7,12 +7,15 @@ export interface GenerateClientAssertionInput {
|
||||
expiresIn?: string;
|
||||
}
|
||||
|
||||
// Mirrors the National ID Program's own reference implementation
|
||||
// (fayda-auth-python): plain {alg: RS256} header, no kid, no jti — eSignet
|
||||
// resolves the verification key from client_id alone.
|
||||
export async function generateClientAssertion(
|
||||
input: GenerateClientAssertionInput,
|
||||
): Promise<string> {
|
||||
const privateKey = await importJWK(input.privateJwk, 'RS256');
|
||||
return new SignJWT({})
|
||||
.setProtectedHeader({ alg: 'RS256', typ: 'JWT' })
|
||||
.setProtectedHeader({ alg: 'RS256' })
|
||||
.setIssuer(input.clientId)
|
||||
.setSubject(input.clientId)
|
||||
.setAudience(input.audience)
|
||||
|
||||
Reference in New Issue
Block a user