lib/service.js
function getAuthorization(user, auth) {
    if (auth === AUTH_BASIC) {
        return 'Basic ' + btoa(user.username + ':' + user.password);
    } else if (auth === AUTH_TOKEN) {
        return 'Token token=' + user.token;
    }
}
function getAuthorization(user, auth) {
    if (auth === AUTH_BASIC) {
        return 'Basic ' + btoa(user.username + ':' + user.password);
    } else if (auth === AUTH_TOKEN) {
        return 'Token token=' + user.token;
    }
}
function getAuthorization ( user , auth ) { if ( auth === AUTH_BASIC ) { return 'Basic ' + btoa ( user . username + ':' + user . password ) ; } else if ( auth === AUTH_TOKEN ) { return 'Token token=' + user . token ; } }
Gets the correctly formatted authorization header
Gets the correctly formatted authorization header