Skip to content

Commit

Permalink
chore: make opts optional as client id is default from the client
Browse files Browse the repository at this point in the history
  • Loading branch information
Brummos committed Jan 13, 2025
1 parent 58af8fe commit b97ff27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/client/lib/OpenID4VCIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export class OpenID4VCIClient {
this._state.pkce = generateMissingPKCEOpts({ ...this._state.pkce, ...pkce });
}

public async acquireAuthorizationChallengeCode(opts: AuthorizationChallengeRequestOpts): Promise<OpenIDResponse<AuthorizationChallengeCodeResponse | AuthorizationChallengeErrorResponse>> {
public async acquireAuthorizationChallengeCode(opts?: AuthorizationChallengeRequestOpts): Promise<OpenIDResponse<AuthorizationChallengeCodeResponse | AuthorizationChallengeErrorResponse>> {
const response = await acquireAuthorizationChallengeAuthCode({

Check warning on line 281 in packages/client/lib/OpenID4VCIClient.ts

View check run for this annotation

Codecov / codecov/patch

packages/client/lib/OpenID4VCIClient.ts#L280-L281

Added lines #L280 - L281 were not covered by tests
clientId: this._state.clientId ?? this._state.authorizationRequestOpts?.clientId,
...opts
Expand Down
2 changes: 1 addition & 1 deletion packages/client/lib/OpenID4VCIClientV1_0_11.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export class OpenID4VCIClientV1_0_11 {
this._state.pkce = generateMissingPKCEOpts({ ...this._state.pkce, ...pkce });
}

public async acquireAuthorizationChallengeCode(opts: AuthorizationChallengeRequestOpts): Promise<OpenIDResponse<AuthorizationChallengeCodeResponse | AuthorizationChallengeErrorResponse>> {
public async acquireAuthorizationChallengeCode(opts?: AuthorizationChallengeRequestOpts): Promise<OpenIDResponse<AuthorizationChallengeCodeResponse | AuthorizationChallengeErrorResponse>> {
const response = await acquireAuthorizationChallengeAuthCode({

Check warning on line 265 in packages/client/lib/OpenID4VCIClientV1_0_11.ts

View check run for this annotation

Codecov / codecov/patch

packages/client/lib/OpenID4VCIClientV1_0_11.ts#L264-L265

Added lines #L264 - L265 were not covered by tests
clientId: this._state.clientId ?? this._state.authorizationRequestOpts?.clientId,
...opts
Expand Down
2 changes: 1 addition & 1 deletion packages/client/lib/OpenID4VCIClientV1_0_13.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class OpenID4VCIClientV1_0_13 {
this._state.pkce = generateMissingPKCEOpts({ ...this._state.pkce, ...pkce });
}

public async acquireAuthorizationChallengeCode(opts: AuthorizationChallengeRequestOpts): Promise<OpenIDResponse<AuthorizationChallengeCodeResponse | AuthorizationChallengeErrorResponse>> {
public async acquireAuthorizationChallengeCode(opts?: AuthorizationChallengeRequestOpts): Promise<OpenIDResponse<AuthorizationChallengeCodeResponse | AuthorizationChallengeErrorResponse>> {
const response = await acquireAuthorizationChallengeAuthCode({

Check warning on line 272 in packages/client/lib/OpenID4VCIClientV1_0_13.ts

View check run for this annotation

Codecov / codecov/patch

packages/client/lib/OpenID4VCIClientV1_0_13.ts#L271-L272

Added lines #L271 - L272 were not covered by tests
clientId: this._state.clientId ?? this._state.authorizationRequestOpts?.clientId,
...opts
Expand Down

0 comments on commit b97ff27

Please sign in to comment.