import { createRemoteJWKSet, jwtVerify } from 'jose';

/**
 *
 * @param apiJwksUrl
 * @returns
 */ const createJWKSet = (apiJwksUrl)=>createRemoteJWKSet(new URL(`${apiJwksUrl}`));
/**
 *
 * @param jwkSet
 * @returns
 */ const verify = (jwkSet)=>(token)=>jwtVerify(token, jwkSet);

export { createJWKSet, verify };
