Merge pull request #28157 from sun1x/patch-1

[passport-strategy] optional 'info' parameter in 'success' method
This commit is contained in:
Benjamin Lichtman
2018-08-16 12:59:40 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ declare class Strategy implements passport.Strategy {
* @param {Object} info
* @api public
*/
success(user: any, info: any): void;
success(user: any, info?: any): void;
/**
* Fail authentication, with optional `challenge` and `status`, defaulting
@@ -33,7 +33,7 @@ export class Strategy extends passport.Strategy {
var self = this;
function verified(err: Error, user: any, info: any) {
function verified(err: Error, user: any, info?: any) {
if (err) {
return self.error(err);
}
@@ -43,6 +43,6 @@ export class Strategy extends passport.Strategy {
self.success(user, info);
}
verified(null, {}, {});
verified(null, {});
}
}