auth

command
Version: v0.0.0-...-f1d4689 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 8 Imported by: 0

README

Authentication Example

$ go run auth/main.go

$ curl http://localhost:8080/auth
unauthorized

$ curl "http://localhost:8080/auth?access_token=footoken"
hello foo

$ curl -H "Authorization:Bearer bartoken" http://localhost:8080/auth
hello bar

$ curl -H "Authorization:Bearer invalidtoken" http://localhost:8080/auth
unauthorized

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

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