RequestResponse.getCredentials()

Parse the username and password from HTTP Basic Auth credentials encoded in the current request.

Usage

Hover over inputs/exits for more info.

var RequestResponse = require('machinepack-reqres');


// Parse the username and password from HTTP Basic Auth credentials encoded in the current request.

RequestResponse.getCredentials({

}).execSync();

Inputs

Exits

error

An unexpected error occurred.

success

OK.

{ username: 'aLADdin', password: 'openses4m30000lol' }