@@ -55,6 +55,7 @@ export class MetadataClientV1_0_15 {
5555 let credential_endpoint : string | undefined
5656 let nonce_endpoint : string | undefined
5757 let deferred_credential_endpoint : string | undefined
58+ let notification_endpoint : string | undefined
5859 let authorization_endpoint : string | undefined
5960 let authorization_challenge_endpoint : string | undefined
6061 let authorizationServerType : AuthorizationServerType = 'OID4VCI'
@@ -66,6 +67,7 @@ export class MetadataClientV1_0_15 {
6667 credential_endpoint = credentialIssuerMetadata . credential_endpoint
6768 nonce_endpoint = credentialIssuerMetadata . nonce_endpoint
6869 deferred_credential_endpoint = credentialIssuerMetadata . deferred_credential_endpoint
70+ notification_endpoint = credentialIssuerMetadata . notification_endpoint
6971 if ( credentialIssuerMetadata . token_endpoint ) {
7072 token_endpoint = credentialIssuerMetadata . token_endpoint
7173 }
@@ -140,6 +142,15 @@ export class MetadataClientV1_0_15 {
140142 deferred_credential_endpoint = authMetadata . deferred_credential_endpoint
141143 }
142144 }
145+ if ( authMetadata . notification_endpoint ) {
146+ if ( notification_endpoint && authMetadata . notification_endpoint !== notification_endpoint ) {
147+ logger . debug (
148+ `Credential issuer has a different notification_endpoint (${ notification_endpoint } ) from the Authorization Server (${ authMetadata . notification_endpoint } ). Will use the issuer value` ,
149+ )
150+ } else {
151+ notification_endpoint = authMetadata . notification_endpoint
152+ }
153+ }
143154 }
144155
145156 if ( ! authorization_endpoint ) {
@@ -182,6 +193,7 @@ export class MetadataClientV1_0_15 {
182193 display : ci . display ?? [ ] ,
183194 ...( nonce_endpoint && { nonce_endpoint } ) ,
184195 ...( deferred_credential_endpoint && { deferred_credential_endpoint } ) ,
196+ ...( notification_endpoint && { notification_endpoint } ) ,
185197 }
186198
187199 logger . debug ( `Issuer ${ issuer } token endpoint ${ token_endpoint } , credential endpoint ${ credential_endpoint } ` )
@@ -192,6 +204,7 @@ export class MetadataClientV1_0_15 {
192204 token_endpoint,
193205 credential_endpoint,
194206 authorization_challenge_endpoint,
207+ notification_endpoint,
195208 authorizationServerType,
196209 credentialIssuerMetadata : v15CredentialIssuerMetadata ,
197210 authorizationServerMetadata : authMetadata ,
0 commit comments