Skip to content

Commit

Permalink
[INJIMOB-2452]: Add issuerHost in VcMetadata.
Browse files Browse the repository at this point in the history
Signed-off-by: BalachandarG <[email protected]>
  • Loading branch information
balachandarg-tw committed Dec 18, 2024
1 parent fa78c46 commit 55a3273
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const VCItemServices = model => {
fetchIssuerWellknown: async context => {
const wellknownResponse = await CACHED_API.fetchIssuerWellknownConfig(
context.vcMetadata.issuer,
context.vcMetadata.credentialIssuer,
context.vcMetadata.issuerHost,
true,
);
try {
Expand Down
10 changes: 5 additions & 5 deletions shared/VCMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class VCMetadata {

downloadKeyType: string = '';
credentialType: string = '';
credentialIssuer: string = '';
issuerHost: string = '';
constructor({
idType = '',
requestId = '',
Expand All @@ -45,7 +45,7 @@ export class VCMetadata {
downloadKeyType = '',
isExpired = false,
credentialType = '',
credentialIssuer = '',
issuerHost = '',
} = {}) {
this.idType = idType;
this.requestId = requestId;
Expand All @@ -60,7 +60,7 @@ export class VCMetadata {
this.downloadKeyType = downloadKeyType;
this.isExpired = isExpired;
this.credentialType = credentialType;
this.credentialIssuer = credentialIssuer;
this.issuerHost = issuerHost;
}

//TODO: Remove any typing and use appropriate typing
Expand All @@ -83,7 +83,7 @@ export class VCMetadata {
: getMosipIndividualId(vc.verifiableCredential, vc.issuer),
downloadKeyType: vc.downloadKeyType,
credentialType: vc.credentialType,
credentialIssuer: vc.credentialIssuer,
issuerHost: vc.issuerHost,
});
}

Expand Down Expand Up @@ -146,7 +146,7 @@ export const getVCMetadata = (
format: context['credentialWrapper'].format,
downloadKeyType: keyType,
credentialType: getCredentialType(context.selectedCredentialType),
credentialIssuer: context.selectedIssuer.credential_issuer,
issuerHost: context.selectedIssuer.credential_issuer,
});
};

Expand Down
2 changes: 1 addition & 1 deletion shared/openId4VCI/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const getCredentialIssuersWellKnownConfig = async (
let matchingWellknownDetails: any;
const wellknownResponse = await CACHED_API.fetchIssuerWellknownConfig(
issuer!,
vcMetadata.credentialIssuer,
vcMetadata.issuerHost,
);
try {
if (wellknownResponse) {
Expand Down

0 comments on commit 55a3273

Please sign in to comment.