New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/passport-http

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/passport-http

TypeScript definitions for passport-http

  • 0.3.11
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/passport-http

Summary

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

Details

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

index.d.ts

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

export interface BasicStrategyOptions<req extends boolean = boolean> {
    realm?: string | undefined;
    passReqToCallback?: req | undefined;
}

export interface DigestStrategyOptions {
    realm?: string | undefined;
    domain?: string | string[] | undefined;
    opaque?: string | undefined;
    algorithm?: string | undefined;
    qop?: string | string[] | undefined;
}

export interface DigestValidateOptions {
    nonce: string;
    cnonce: string;
    nc: number;
    opaque: string;
}

export type BasicVerifyFunction = (
    username: string,
    password: string,
    done: (error: any, user?: any) => void,
) => any;

export type BasicVerifyFunctionWithRequest = (
    req: express.Request,
    username: string,
    password: string,
    done: (error: any, user?: any) => void,
) => any;

export type DigestSecretFunction = (
    username: string,
    done: (error: any, user?: any, password?: any) => void,
) => any;

export type DigestValidateFunction = (
    params: DigestValidateOptions,
    done: (error: any, valid: boolean) => void,
) => any;

export class BasicStrategy implements passport.Strategy {
    constructor(verify: BasicVerifyFunction);
    constructor(options: BasicStrategyOptions<false>, verify: BasicVerifyFunction);
    constructor(options: BasicStrategyOptions<true>, verify: BasicVerifyFunctionWithRequest);

    name: string;
    authenticate(req: express.Request, options?: object): void;
}

export class DigestStrategy implements passport.Strategy {
    constructor(secret: DigestSecretFunction, validate?: DigestValidateFunction);
    constructor(options: DigestStrategyOptions, secret: DigestSecretFunction, validate?: DigestValidateFunction);

    name: string;
    authenticate(req: express.Request, options?: object): void;
}

Additional Details

Credits

These definitions were written by Christophe Vidal, Tomek Łaziuk, Chris Barth, and James Adarich.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc