Signature generation and validation for REST API query authentication