Merge pull request #16524 from vesse/basic-auth/parse

[basic-auth] Add auth.parse
This commit is contained in:
jramsay
2017-06-01 12:47:06 -07:00
committed by GitHub
2 changed files with 9 additions and 2 deletions
+2
View File
@@ -2,3 +2,5 @@
import auth = require('basic-auth');
auth(null);
auth.parse('Basic QmFzaWM6QXV0aA==');
+7 -2
View File
@@ -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;