@types/passport-http-bearer
Advanced tools
Comparing version 1.0.35 to 1.0.36
@@ -9,5 +9,7 @@ // Type definitions for passport-http-bearer 1.0.1 | ||
/// <reference types="express" /> | ||
/// <reference types="koa" /> | ||
import passport = require("passport"); | ||
import express = require("express"); | ||
import koa = require("koa"); | ||
@@ -28,10 +30,20 @@ interface IStrategyOptions { | ||
interface IKoaContextContainer { ctx: koa.Context; } | ||
type KoaPassportExpressRequestMock = Partial<express.Request> & IKoaContextContainer; | ||
interface VerifyFunctionWithRequest { | ||
(req: express.Request, token: string, done: (error: any, user?: any, options?: IVerifyOptions | string) => void): void; | ||
} | ||
interface VerifyFunctionWithContext { | ||
(req: KoaPassportExpressRequestMock, token: string, done: (error: any, user?: any, options?: IVerifyOptions | string) => void): void; | ||
} | ||
declare class Strategy implements passport.Strategy { | ||
type VerifyFunctions = | ||
| VerifyFunction | ||
| VerifyFunctionWithRequest | ||
| VerifyFunctionWithContext; | ||
declare class Strategy<T extends VerifyFunctions> implements passport.Strategy { | ||
constructor(verify: VerifyFunction); | ||
constructor(options: IStrategyOptions, verify: VerifyFunction); | ||
constructor(options: IStrategyOptions, verify: VerifyFunctionWithRequest); | ||
constructor(options: IStrategyOptions, verify: T); | ||
@@ -38,0 +50,0 @@ name: string; |
{ | ||
"name": "@types/passport-http-bearer", | ||
"version": "1.0.35", | ||
"version": "1.0.36", | ||
"description": "TypeScript definitions for passport-http-bearer", | ||
@@ -23,6 +23,7 @@ "license": "MIT", | ||
"@types/express": "*", | ||
"@types/koa": "*", | ||
"@types/passport": "*" | ||
}, | ||
"typesPublisherContentHash": "c4a7725324aa398d77b1f88f7209956fb61f7991ec57c3eadd222fc7698c9cd6", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "5cd2e735ac43763506bf51841a5bf895850354379ea61141b93dd4f3b9c4395c", | ||
"typeScriptVersion": "3.1" | ||
} |
@@ -11,4 +11,4 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sat, 04 Apr 2020 00:01:43 GMT | ||
* Dependencies: [@types/passport](https://npmjs.com/package/@types/passport), [@types/express](https://npmjs.com/package/@types/express) | ||
* Last updated: Tue, 15 Sep 2020 16:31:47 GMT | ||
* Dependencies: [@types/passport](https://npmjs.com/package/@types/passport), [@types/express](https://npmjs.com/package/@types/express), [@types/koa](https://npmjs.com/package/@types/koa) | ||
* Global values: none | ||
@@ -15,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
4351
41
3
+ Added@types/koa@*
+ Added@types/accepts@1.3.7(transitive)
+ Added@types/content-disposition@0.5.8(transitive)
+ Added@types/cookies@0.9.0(transitive)
+ Added@types/http-assert@1.5.6(transitive)
+ Added@types/keygrip@1.0.6(transitive)
+ Added@types/koa@2.15.0(transitive)
+ Added@types/koa-compose@3.2.8(transitive)
+ Added@types/node@22.13.9(transitive)
- Removed@types/node@22.13.8(transitive)