0.0.4 • Published 6 months ago

@types/passport-remember-me-extended v0.0.4

Weekly downloads
35
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/passport-remember-me-extended

Summary

This package contains type definitions for passport-remember-me-extended (https://github.com/dereklakin/passport-remember-me).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-remember-me-extended.

index.d.ts

// Type definitions for passport-remember-me-extended 0.0
// Project: https://github.com/dereklakin/passport-remember-me
// Definitions by: AylaJK <https://github.com/AylaJK>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import passport = require('passport');
import express = require('express');

export interface StrategyOption {
    key?: string | undefined;
    cookie?: express.CookieOptions | undefined;
}

export interface StrategyOptionWithRequest extends StrategyOption {
    passReqToCallback: true;
}

export type VerifyFunction =
    (token: any, done: (err: any, user?: any, info?: any) => void) => void;

export type VerifyFunctionWithRequest =
    (req: express.Request, token: any, done: (err: any, user?: any, info?: any) => void) => void;

export type IssueFunction =
    (user: any, done: (err: any, token?: any) => void) => void;

export type IssueFunctionWithRequest =
    (req: express.Request, user: any, done: (err: any, token?: any) => void) => void;

export class Strategy extends passport.Strategy {
    constructor(verify: VerifyFunction, issue: IssueFunction);
    constructor(options: StrategyOptionWithRequest, verify: VerifyFunctionWithRequest, issue: IssueFunctionWithRequest);
    constructor(options: StrategyOption, verify: VerifyFunction, issue: IssueFunction);

    authenticate(req: express.Request, options?: passport.AuthenticateOptions): void;
}

Additional Details

Credits

These definitions were written by AylaJK.

0.0.3

7 months ago

0.0.2

8 months ago

0.0.4

6 months ago

0.0.1

3 years ago

0.0.0

6 years ago