generate-hawk-header

command
v0.0.0-...-eac43e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2017 License: MPL-2.0 Imports: 13 Imported by: 0

README

About

generate-hawk-header creates a Hawk authentication string with a valid token. This can be used to make requests to a sync storage server with curl.

For example:

URL="http://localhost:8888/1.5/12345/info/configuration"; \
	HAWK=$(go run ./main.go "$URL" "SECRET"); \
	curl -vH "Authorization: $HAWK" "$URL"

Remember:

  1. The URL must be an absolute url. This includes the correct protocol schema, sync node hostname, port and path.
  2. The correct secret for the sync node must used

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL