@graphql-yoga/plugin-jwt
Version:
jwt plugin for GraphQL Yoga.
19 lines (18 loc) • 1.03 kB
text/typescript
import { GraphQLError } from 'graphql';
import { type Options as JwksClientOptions } from 'jwks-rsa';
import type { ExtractTokenFunction, GetSigningKeyFunction } 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?: ConstructorParameters<typeof GraphQLError>[1]): GraphQLError;
export declare function unauthorizedError(message: string, options?: ConstructorParameters<typeof GraphQLError>[1]): GraphQLError;
export declare function createInlineSigningKeyProvider(signingKey: string): GetSigningKeyFunction;
export declare function createRemoteJwksSigningKeyProvider(jwksClientOptions: JwksClientOptions): GetSigningKeyFunction;