lib/routes/token.js
function parseHeader(authHeader, callback){
        try {
            var parts=authHeader.split(/:/),
                username=parts[0],
                password=parts[1];

            callback(null, {username: username, password: password});
        }
        catch(ex){
            callback(ex);
        }
    }
function parseHeader(authHeader, callback){
        try {
            var parts=authHeader.split(/:/),
                username=parts[0],
                password=parts[1];

            callback(null, {username: username, password: password});
        }
        catch(ex){
            callback(ex);
        }
    }
function parseHeader ( authHeader , callback ) { try { var parts = authHeader . split ( / : / ) , username = parts [ 0 ] , password = parts [ 1 ] ; callback ( null , { username : username , password : password } ) ; } catch ( ex ) { callback ( ex ) ; } }
Method will pull out the username and password out of the auth header.
@param authHeader String found in the HTTP authentication header.
@param callback
Method will pull out the username and password out of the auth header .