auth

command
v0.0.0-...-1628972 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 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.

Jump to

Keyboard shortcuts

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