Skip to content

Commit

Permalink
feat: Allow to set the clientId at a later point on the VCI client
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Feb 9, 2024
1 parent dfb2280 commit 042b183
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/client/lib/OpenID4VCIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class OpenID4VCIClient {
'com.sphereon.ssi.wallet';
this._pkce = { ...this._pkce, ...pkce };
this._authorizationRequestOpts = this.syncAuthorizationRequestOpts(authorizationRequest);
console.log(`Authorization req options: ${JSON.stringify(this._authorizationRequestOpts, null, 2)}`);
debug(`Authorization req options: ${JSON.stringify(this._authorizationRequestOpts, null, 2)}`);
}

public static async fromCredentialIssuer({
Expand Down Expand Up @@ -160,9 +160,8 @@ export class OpenID4VCIClient {
credentialOfferClient.supportedFlows.includes(AuthzFlowType.AUTHORIZATION_CODE_FLOW) &&
(createAuthorizationRequestURL === undefined || createAuthorizationRequestURL)
) {
console.log(`AUTH REQ`);
await client.createAuthorizationRequestUrl({ authorizationRequest, pkce });
console.log(`AUTH REQ URL: ${client._authorizationURL}`);
debug(`Authorization Request URL: ${client._authorizationURL}`);
}

return client;
Expand Down Expand Up @@ -487,9 +486,8 @@ export class OpenID4VCIClient {
return this._alg;
}


set clientId(value: string | undefined) {
this._clientId = value
this._clientId = value;
}

get clientId(): string | undefined {
Expand Down

0 comments on commit 042b183

Please sign in to comment.