Skip to content

Commit

Permalink
chore: Disable E2E test because of infra issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Feb 15, 2024
1 parent c02526a commit 9f0679e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
21 changes: 12 additions & 9 deletions packages/client/lib/OpenID4VCIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const debug = Debug('sphereon:oid4vci');

export interface OpenID4VCIClientState {
credentialIssuer: string;
credentialOffer?: CredentialOfferRequestWithBaseUrl
credentialOffer?: CredentialOfferRequestWithBaseUrl;
clientId?: string;
kid?: string;
jwk?: JWK;
Expand All @@ -65,7 +65,7 @@ export class OpenID4VCIClient {
endpointMetadata,
accessTokenResponse,
authorizationRequestOpts,
authorizationURL
authorizationURL,
}: {
credentialOffer?: CredentialOfferRequestWithBaseUrl;
kid?: string;
Expand Down Expand Up @@ -96,11 +96,11 @@ export class OpenID4VCIClient {
jwk,
endpointMetadata,
accessTokenResponse,
authorizationURL
}
authorizationURL,
};
// Running syncAuthorizationRequestOpts later as it is using the state
if (!this._state.authorizationRequestOpts) {
this._state.authorizationRequestOpts = this.syncAuthorizationRequestOpts(authorizationRequest)
this._state.authorizationRequestOpts = this.syncAuthorizationRequestOpts(authorizationRequest);
}
debug(`Authorization req options: ${JSON.stringify(this._state.authorizationRequestOpts, null, 2)}`);
}
Expand Down Expand Up @@ -141,8 +141,8 @@ export class OpenID4VCIClient {
return client;
}

public static async fromState({ state }: {state: OpenID4VCIClientState | string }): Promise<OpenID4VCIClient> {
const clientState = typeof state === 'string' ? JSON.parse(state) : state
public static async fromState({ state }: { state: OpenID4VCIClientState | string }): Promise<OpenID4VCIClient> {
const clientState = typeof state === 'string' ? JSON.parse(state) : state;

return new OpenID4VCIClient(clientState);
}
Expand Down Expand Up @@ -208,7 +208,10 @@ export class OpenID4VCIClient {

// todo: Probably can go with current logic in MetadataClient who will always set the authorization_endpoint when found
// handling this because of the support for v1_0-08
if (this._state.endpointMetadata?.credentialIssuerMetadata && 'authorization_endpoint' in this._state.endpointMetadata.credentialIssuerMetadata) {
if (
this._state.endpointMetadata?.credentialIssuerMetadata &&
'authorization_endpoint' in this._state.endpointMetadata.credentialIssuerMetadata
) {
this._state.endpointMetadata.authorization_endpoint = this._state.endpointMetadata.credentialIssuerMetadata.authorization_endpoint as string;
}
this._state.authorizationURL = await createAuthorizationRequestUrl({
Expand Down Expand Up @@ -424,7 +427,7 @@ export class OpenID4VCIClient {
}

public async exportState(): Promise<string> {
return JSON.stringify(this._state)
return JSON.stringify(this._state);
}

// FIXME: We really should convert <v11 to v12 objects first. Right now the logic doesn't map nicely and is brittle.
Expand Down
4 changes: 2 additions & 2 deletions packages/client/lib/__tests__/SphereonE2E.spec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { v4 } from 'uuid';

import { OpenID4VCIClient } from '..';

export const UNIT_TEST_TIMEOUT = 30000;
export const UNIT_TEST_TIMEOUT = 60000;

const ISSUER_URL = 'https://ssi.sphereon.com/pf3';

Expand Down Expand Up @@ -66,7 +66,7 @@ describe('OID4VCI-Client using Sphereon issuer should', () => {
},
UNIT_TEST_TIMEOUT,
);
it(
xit(
'succeed in a full flow with the client using OpenID4VCI version 11 and jwt_vc_json',
async () => {
await test('jwt_vc_json');
Expand Down

0 comments on commit 9f0679e

Please sign in to comment.