refactoring access/http related code
add hmac api auth support