From b8b0cfd79c26f2cb60dec52f15cfa53b34088b47 Mon Sep 17 00:00:00 2001 From: Niels Klomp Date: Tue, 25 Jul 2023 03:25:44 +0200 Subject: [PATCH] chore: several config fixes --- packages/w3c-vc-api/src/api-functions.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/w3c-vc-api/src/api-functions.ts b/packages/w3c-vc-api/src/api-functions.ts index 59adf2424..412fc535b 100644 --- a/packages/w3c-vc-api/src/api-functions.ts +++ b/packages/w3c-vc-api/src/api-functions.ts @@ -3,7 +3,6 @@ import { checkAuth, ISingleEndpointOpts, sendErrorResponse } from '@sphereon/ssi import { CredentialPayload } from '@veramo/core' import { W3CVerifiableCredential } from '@veramo/core/src/types/vc-data-model' import { Request, Response, Router } from 'express' -import passport from 'passport' import { v4 } from 'uuid' import { IIssueCredentialEndpointOpts, IRequiredContext, IVCAPIIssueOpts, IVerifyCredentialEndpointOpts } from './types' @@ -14,7 +13,7 @@ export function issueCredentialEndpoint(router: Router, context: IRequiredContex } const path = opts?.path ?? '/credentials/issue' - router.post(path, passport.authenticate('oauth-bearer'), checkAuth(opts?.endpoint), async (request: Request, response: Response) => { + router.post(path, checkAuth(opts?.endpoint), async (request: Request, response: Response) => { try { const credential: CredentialPayload = request.body.credential if (!credential) { @@ -110,7 +109,7 @@ export function deleteCredentialEndpoint(router: Router, context: IRequiredConte console.log(`Delete credential endpoint is disabled`) return } - router.delete(opts?.path ?? '/credentials/:id', async (request: Request, response: Response) => { + router.delete(opts?.path ?? '/credentials/:id', checkAuth(opts?.endpoint), async (request: Request, response: Response) => { try { const id = request.params.id if (!id) {