func validateRequestSignature(r *AuthRequest, pubKey string) error {
	cred := r.Credentials
	msg, err := r.Hash()
	if err != nil {
		return err
	}

	if err = validateSignature(cred["x-signature"], msg, pubKey); err != nil {
		return err
	}
	return nil
}
// Validates that the signature sent in the request was generated for the current request
Validates that the signature sent in the request was generated for the current request
// Validates that the signature sent in the request was generated for the current request
func validateRequestSignature(r *AuthRequest, pubKey string) error {
	cred := r.Credentials
	msg, err := r.Hash()
	if err != nil {
		return err
	}
	if err = validateSignature(cred["x-signature"], msg, pubKey); err != nil {
		return err
	}
	return nil
}
func validateRequestSignature ( r * AuthRequest , pubKey string ) error { cred := r . Credentials msg , err := r . Hash ( ) if err != nil { return err } if err = validateSignature ( cred [ " " ] , msg , pubKey ) ; err != nil { return err } return nil }
Validates that the signature sent in the request was generated for the current request
Validates that the signature sent in the request was generated for the current request