mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
* fix(passport-http): use unused template param It looks like this was rigged up so the appropriate callback definition could be inferred, but one detail got missed. * test(passport-http): add tests demonstrating passReqToCallback
This commit is contained in:
committed by
Jesse Trinity
parent
980af53777
commit
64dcd8e53f
Vendored
+1
-1
@@ -12,7 +12,7 @@ import express = require("express");
|
||||
|
||||
export interface BasicStrategyOptions<req extends boolean = boolean> {
|
||||
realm?: string;
|
||||
passReqToCallback?: boolean;
|
||||
passReqToCallback?: req;
|
||||
}
|
||||
|
||||
export interface DigestStrategyOptions {
|
||||
|
||||
@@ -25,6 +25,9 @@ function validateNonce(nonce: string) {
|
||||
function validateParams(nonce: string, cnonce: string, nc: number, opaque: string) {
|
||||
}
|
||||
|
||||
new http.BasicStrategy({passReqToCallback: false}, (username, password, done) => {});
|
||||
new http.BasicStrategy({passReqToCallback: true}, (req, username, password, done) => {});
|
||||
|
||||
passport.use(new http.BasicStrategy((username, password, done) => {
|
||||
User.findOne({
|
||||
username,
|
||||
|
||||
Reference in New Issue
Block a user