1.0.4 • Published 6 months ago
@types/passport-auth-token v1.0.4
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
// Type definitions for passport-auth-token 1.0
// Project: https://github.com/mbell8903/passport-auth-token.git
// Definitions by: Ian Woongsoo Lee <https://github.com/yummyummyummy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <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: Thu, 08 Jul 2021 20:19:21 GMT
- Dependencies: @types/express, @types/passport-strategy, @types/passport
- Global values: none
Credits
These definitions were written by Ian Woongsoo Lee.