npm.io
5.0.8 • Published 2 years ago

@types/hapi-auth-basic

Licence
MIT
Version
5.0.8
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/hapi-auth-basic

Summary

This package contains type definitions for hapi-auth-basic (https://github.com/hapijs/hapi-auth-basic).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hapi-auth-basic.

index.d.ts

import { Plugin, Request, ResponseToolkit } from "hapi";

declare namespace Basic {
    interface ValidateCustomResponse {
        response: any;
    }

    interface ValidateResponse {
        isValid: boolean;
        credentials?: any;
    }

    interface Validate {
        (
            request: Request,
            username: string,
            password: string,
            h: ResponseToolkit,
        ): Promise<ValidateResponse | ValidateCustomResponse>;
    }
}

declare var Basic: Plugin<{}>;

export = Basic;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: @types/hapi

Credits

These definitions were written by AJP, and Rodrigo Saboya.