Skip to content

Commit

Permalink
refactor: Rolled back the changes, metadata is already present in the…
Browse files Browse the repository at this point in the history
… constructor of the OpenID4VCIClient's constructor
  • Loading branch information
Zoe Maas committed Nov 25, 2024
1 parent c253784 commit 089be8a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/client/lib/MetadataClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ export class MetadataClient {
/**
* Retrieve all metadata from an issuer
* @param issuer The issuer URL
* @param credIssuerMetadata
* @param opts
*/
public static async retrieveAllMetadata(
issuer: string,
credIssuerMetadata?: CredentialIssuerMetadataV1_0_11 | CredentialIssuerMetadataV1_0_13 | (IssuerMetadataV1_0_08 & Partial<AuthorizationServerMetadata>),
opts?: { errorOnNotFound: boolean },
): Promise<EndpointMetadataResultV1_0_13 | EndpointMetadataResultV1_0_11> {
let token_endpoint: string | undefined;
Expand All @@ -76,7 +74,7 @@ export class MetadataClient {
let authorization_servers: string[] | undefined = [issuer];
let authorization_server: string | undefined = undefined;
const oid4vciResponse = await MetadataClient.retrieveOpenID4VCIServerMetadata(issuer, { errorOnNotFound: false }); // We will handle errors later, given we will also try other metadata locations
let credentialIssuerMetadata = credIssuerMetadata ?? oid4vciResponse?.successBody;
let credentialIssuerMetadata = oid4vciResponse?.successBody;
if (credentialIssuerMetadata) {
debug(`Issuer ${issuer} OID4VCI well-known server metadata\r\n${JSON.stringify(credentialIssuerMetadata)}`);
credential_endpoint = credentialIssuerMetadata.credential_endpoint;
Expand Down

0 comments on commit 089be8a

Please sign in to comment.