test/fixtures/servers/_servers.js
// if this function throws error, it means that the authorization header is malformed
if this function throws error, it means that the authorization header is malformed
if this function throws error it means that the authorization header is malformed
function parseAuthHeader (authHeader) {
        var params = {};
        authHeader = authHeader.split(' ')[1].split(';');
        params.clientToken = authHeader[0].replace('client_token=', '');
        params.accessToken = authHeader[1].replace('access_token=', '');
        params.timestamp = authHeader[2].replace('timestamp=', '');
        params.nonce = authHeader[3].replace('nonce=', '');
        params.signature = authHeader[4].replace('signature=', '');
        return params;
    }
function parseAuthHeader ( authHeader ) { var params = { } ; authHeader = authHeader . split ( ' ' ) [ 1 ] . split ( ';' ) ; params . clientToken = authHeader [ 0 ] . replace ( 'client_token=' , '' ) ; params . accessToken = authHeader [ 1 ] . replace ( 'access_token=' , '' ) ; params . timestamp = authHeader [ 2 ] . replace ( 'timestamp=' , '' ) ; params . nonce = authHeader [ 3 ] . replace ( 'nonce=' , '' ) ; params . signature = authHeader [ 4 ] . replace ( 'signature=' , '' ) ; return params ; }
if this function throws error, it means that the authorization header is malformed
if this function throws error it means that the authorization header is malformed