0.0.3 • Published 6 months ago

@types/passport-remember-me v0.0.3

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

Installation

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

Summary

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

Details

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

index.d.ts

// Type definitions for passport-remember-me 0.0
// Project: https://github.com/jaredhanson/passport-remember-me
// Definitions by: gristow <https://github.com/gristow>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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

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

export type VerifyFunction = (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: StrategyOption, verify: VerifyFunction, issue: IssueFunction);

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

Additional Details

Credits

These definitions were written by gristow.

0.0.1

8 months ago

0.0.3

6 months ago

0.0.2

7 months ago

0.0.0

2 years ago