Skip to content

Commit 74760b9

Browse files
RinkalBhojanitipusinghaw
authored andcommitted
added x509 cert for mdoc
Signed-off-by: Rinkal Bhojani <[email protected]>
1 parent 3af9804 commit 74760b9

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

apps/oid4vc-issuance/src/oid4vc-issuance.repository.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ export class Oid4vcIssuanceRepository {
121121
orgId
122122
}
123123
},
124+
// include: {
125+
// templates: true
126+
// },
124127
orderBy: {
125128
createDateTime: 'desc'
126129
}

apps/oid4vc-issuance/src/oid4vc-issuance.service.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,29 @@ export class Oid4vcIssuanceService {
223223
}
224224
}
225225

226-
async oidcIssuers(orgId: string): Promise<oidc_issuer[]> {
226+
async oidcIssuers(orgId: string): Promise<any> {
227+
//Promise<IssuerResponse[]> {
227228
try {
228229
const agentDetails = await this.oid4vcIssuanceRepository.getAgentEndPoint(orgId);
229230
if (!agentDetails?.agentEndPoint) {
230231
throw new NotFoundException(ResponseMessages.issuance.error.agentEndPointNotFound);
231232
}
232233
const getIssuers = await this.oid4vcIssuanceRepository.getAllOidcIssuersByOrg(orgId);
233234

235+
// const url = await getAgentUrl(agentDetails.agentEndPoint, CommonConstants.OIDC_GET_ALL_ISSUERS);
236+
// const issuersDetails = await this._oidcGetIssuers(url, orgId);
237+
// if (!issuersDetails || null == issuersDetails.response) {
238+
// throw new InternalServerErrorException('Error from agent while oidcIssuers');
239+
// }
240+
// //TODO: Fix the response type from agent
241+
// const raw = issuersDetails.response as unknown;
242+
// const response: IssuerResponse[] =
243+
// 'string' === typeof raw ? (JSON.parse(raw) as IssuerResponse[]) : (raw as IssuerResponse[]);
244+
245+
// if (!Array.isArray(response)) {
246+
// throw new InternalServerErrorException('Invalid issuer payload from agent');
247+
// }
248+
// return response;
234249
return getIssuers;
235250
} catch (error: any) {
236251
const msg = error?.message ?? 'unknown error';

libs/enum/src/enum.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,9 @@ export enum CredentialFormat {
322322
SdJwtVc = 'vc+sd-jwt',
323323
Mdoc = 'mso_mdoc'
324324
}
325+
326+
// export enum SignerOption {
327+
// DID,
328+
// X509_P256,
329+
// X509_ED25519
330+
// }

0 commit comments

Comments
 (0)