OAUTH2 example with GO, JWT-go and gorilla
before get started, you have to know :
- Install Glide https://github.com/Masterminds/glide
- Install dependencies
$ glide install
after this step, you can do this:
- go run main.go
try it with curl:
curl localhost:9000/token?grant_type=password -X POST -d "{"username": "wuriyanto", "password": "123456"}'
if you using windows:
curl localhost:9000/token?grant_type=password -X POST -d "{\"username\": \"wuriyanto\", \"password\": \"123456\"}'
- Password Grant Type
- Add Client Credentials Grant
- Add new Code
- Writing test
Copyright 2017 Wuriyanto Musobar