func (c *EphemeralKey) AddRequestHeaders(r *http.Request, accessToken string) error {
	timestamp := time.Now().Unix()

	msg, err := commons.GenerateHTTPRequestHash(r, timestamp)
	if err != nil {
		return err
	}

	fieldExtractor := func() (strings map[string]string, e error) {
		return c.generateCredentials(msg, accessToken, timestamp)
	}

	return completeRequest(r, fieldExtractor)
}
// AddRequestHeaders adds all  needed credentials to authenticate the credential owner as request headers
AddRequestHeaders adds all  needed credentials to authenticate the credential owner as request headers
// AddRequestHeaders adds all needed credentials to authenticate the credential owner as request headers
func (c *EphemeralKey) AddRequestHeaders(r *http.Request, accessToken string) error {
	timestamp := time.Now().Unix()
	msg, err := commons.GenerateHTTPRequestHash(r, timestamp)
	if err != nil {
		return err
	}
	fieldExtractor := func() (strings map[string]string, e error) {
		return c.generateCredentials(msg, accessToken, timestamp)
	}
	return completeRequest(r, fieldExtractor)
}
func ( c * EphemeralKey ) AddRequestHeaders ( r * http . Request , accessToken string ) error { timestamp := time . Now ( ) . Unix ( ) msg , err := commons . GenerateHTTPRequestHash ( r , timestamp ) if err != nil { return err } fieldExtractor := func ( ) ( strings map [ string ] string , e error ) { return c . generateCredentials ( msg , accessToken , timestamp ) } return completeRequest ( r , fieldExtractor ) }
AddRequestHeaders adds all  needed credentials to authenticate the credential owner as request headers
AddRequestHeaders adds all needed credentials to authenticate the credential owner as request headers