File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
openid4vp/src/authorization-response Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @openid4vc/openid4vp " : minor
3+ " @openid4vc/oauth2 " : minor
4+ ---
5+
6+ apu and apv in JWE encryptor are now base64 encoded values, to align with JOSE
Original file line number Diff line number Diff line change @@ -71,7 +71,15 @@ export type JwtSignerWithJwk = JwtSigner & { publicJwk: Jwk }
7171
7272export type JweEncryptor = JwtSignerJwk & {
7373 enc : string
74+
75+ /**
76+ * base64-url encoded apu
77+ */
7478 apu ?: string
79+
80+ /**
81+ * base64-url encoded apv
82+ */
7583 apv ?: string
7684}
7785
Original file line number Diff line number Diff line change 77 Oauth2ServerErrorResponseError ,
88 fetchJwks ,
99} from '@openid4vc/oauth2'
10- import { dateToSeconds } from '@openid4vc/utils'
10+ import { dateToSeconds , encodeToBase64Url } from '@openid4vc/utils'
1111import { addSecondsToDate } from '../../../utils/src/date'
1212import type { Openid4vpAuthorizationRequest } from '../authorization-request/z-authorization-request'
1313import type { Openid4vpAuthorizationRequestDcApi } from '../authorization-request/z-authorization-request-dc-api'
@@ -163,8 +163,8 @@ export async function createOpenid4vpAuthorizationResponse(
163163 ? {
164164 method : 'jwk' ,
165165 publicJwk : clientMetaJwks . encJwk ,
166- apu : jarm . encryption ?. nonce ,
167- apv : authorizationRequestPayload . nonce ,
166+ apu : jarm . encryption . nonce ? encodeToBase64Url ( jarm . encryption . nonce ) : undefined ,
167+ apv : encodeToBase64Url ( authorizationRequestPayload . nonce ) ,
168168 alg : supportedJarmMetadata . client_metadata . authorization_encrypted_response_alg ,
169169 enc : supportedJarmMetadata . client_metadata . authorization_encrypted_response_enc ,
170170 }
You can’t perform that action at this time.
0 commit comments