Installation
npm install --save @types/passport-auth-token
Summary
This package contains type definitions for passport-auth-token (https://github.com/mbell8903/passport-auth-token.git).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-auth-token.
index.d.ts
/// <reference types="passport"/>
import express = require("express");
import { Strategy as PassportStrategy } from "passport-strategy";
interface StrategyOptions {
tokenFields?: string[] | undefined;
headerFields?: string[] | undefined;
session?: boolean | undefined;
passReqToCallback?: false | undefined;
params?: boolean | undefined;
optional?: boolean | undefined;
caseInsensitive?: boolean | undefined;
}
interface StrategyOptionsWithRequest {
tokenFields?: string[] | undefined;
headerFields?: string[] | undefined;
session?: boolean | undefined;
passReqToCallback: true;
params?: boolean | undefined;
optional?: boolean | undefined;
caseInsensitive?: boolean | undefined;
}
interface VerifyOptions {
message: string;
}
interface VerifyFunctionWithRequest {
(req: express.Request, token: string, done: (error: any, user?: any, options?: VerifyOptions) => void): void;
}
interface VerifyFunction {
(token: string, done: (error: any, user?: any, options?: VerifyOptions) => void): void;
}
declare class Strategy extends PassportStrategy {
constructor(options: StrategyOptionsWithRequest, verify: VerifyFunctionWithRequest);
constructor(options: StrategyOptions, verify: VerifyFunction);
constructor(verify: VerifyFunction);
name: string;
}
export = Strategy;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/express, @types/passport, @types/passport-strategy
Credits
These definitions were written by Ian Woongsoo Lee.