diff --git a/packages/siop-oid4vp/lib/op/OP.ts b/packages/siop-oid4vp/lib/op/OP.ts index d3195427..32c701c7 100644 --- a/packages/siop-oid4vp/lib/op/OP.ts +++ b/packages/siop-oid4vp/lib/op/OP.ts @@ -183,8 +183,7 @@ export class OP { const authResponseAsURI = encodeJsonAsURI(payload, { arraysWithIndex: ['presentation_submission'] }) try { const result = await post(responseUri, authResponseAsURI, { contentType: ContentType.FORM_URL_ENCODED, exceptionOnHttpErrorStatus: true }) - const redirectUri = result.successBody?.['redirect_uri']; - await this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_SENT_SUCCESS, { correlationId, subject: response, redirectUri: redirectUri }) + await this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_SENT_SUCCESS, { correlationId, subject: response }) return result.origResponse } catch (error) { await this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_SENT_FAILED, { correlationId, subject: response, error: error as Error }) @@ -259,7 +258,6 @@ export class OP { payload: { correlationId: string subject: AuthorizationRequest | AuthorizationResponse | string | URI - redirectUri?: string error?: Error }, ): Promise { diff --git a/packages/siop-oid4vp/lib/types/Events.ts b/packages/siop-oid4vp/lib/types/Events.ts index e320b273..e3afa08b 100644 --- a/packages/siop-oid4vp/lib/types/Events.ts +++ b/packages/siop-oid4vp/lib/types/Events.ts @@ -26,27 +26,21 @@ export enum AuthorizationEvents { export class AuthorizationEvent { private readonly _subject: T | undefined - private readonly _redirectUri: string | undefined private readonly _error?: Error private readonly _timestamp: number private readonly _correlationId: string - public constructor(args: { correlationId: string; subject?: T; redirectUri?: string, error?: Error }) { + public constructor(args: { correlationId: string; subject?: T; error?: Error }) { //fixme: Create correlationId if not provided. Might need to be deferred to registry though this._correlationId = args.correlationId this._timestamp = Date.now() this._subject = args.subject - this._redirectUri = args.redirectUri this._error = args.error } get subject(): T | undefined { return this._subject } - - get redirectUri(): string | undefined { - return this._redirectUri - } get timestamp(): number { return this._timestamp