Adding support for payload authentication validation

Closes #379