mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
Merge pull request #16524 from vesse/basic-auth/parse
[basic-auth] Add auth.parse
This commit is contained in:
@@ -2,3 +2,5 @@
|
||||
import auth = require('basic-auth');
|
||||
|
||||
auth(null);
|
||||
|
||||
auth.parse('Basic QmFzaWM6QXV0aA==');
|
||||
|
||||
Vendored
+7
-2
@@ -1,6 +1,6 @@
|
||||
// Type definitions for basic-auth
|
||||
// Type definitions for basic-auth v1.1.0
|
||||
// Project: https://github.com/jshttp/basic-auth
|
||||
// Definitions by: Clément Bourgeois <https://github.com/moonpyk>
|
||||
// Definitions by: Clément Bourgeois <https://github.com/moonpyk>, Vesa Poikajärvi <https://github.com/vesse>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
@@ -14,6 +14,11 @@ declare namespace auth {
|
||||
name: string;
|
||||
pass: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse basic auth to object.
|
||||
*/
|
||||
function parse(authorizationHeader: string): auth.BasicAuthResult | undefined;
|
||||
}
|
||||
|
||||
export = auth;
|
||||
|
||||
Reference in New Issue
Block a user