UNPKG

@graphql-yoga/plugin-jwt

Version:
19 lines (18 loc) 1.07 kB
import { createGraphQLError } from 'graphql-yoga'; import { type Options as JwksClientOptions } from 'jwks-rsa'; import { GetSigningKeyFunction, type ExtractTokenFunction } from './config.cjs'; import '@whatwg-node/server-plugin-cookies'; export declare function extractFromHeader(options: { name: string; prefix?: string; }): ExtractTokenFunction; export declare function extractFromCookie(options: { name: string; }): ExtractTokenFunction; export declare function extractFromConnectionParams(options: { name: string; }): ExtractTokenFunction; export declare function badRequestError(message: string, options?: Parameters<typeof createGraphQLError>[1]): import("graphql").GraphQLError; export declare function unauthorizedError(message: string, options?: Parameters<typeof createGraphQLError>[1]): import("graphql").GraphQLError; export declare function createInlineSigningKeyProvider(signingKey: string): GetSigningKeyFunction; export declare function createRemoteJwksSigningKeyProvider(jwksClientOptions: JwksClientOptions): GetSigningKeyFunction;