Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cryptix/jwtauth
Some simple Handlers and Helpers to use JSON Web Tokens for go http stuff.
https://github.com/cryptix/jwtauth
Last synced: about 1 month ago
JSON representation
Some simple Handlers and Helpers to use JSON Web Tokens for go http stuff.
- Host: GitHub
- URL: https://github.com/cryptix/jwtauth
- Owner: cryptix
- License: mit
- Created: 2014-05-22T15:47:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-03T09:52:36.000Z (almost 10 years ago)
- Last Synced: 2024-10-08T00:19:08.115Z (about 1 month ago)
- Language: Go
- Size: 184 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
jwtAuth
=======
[![GoDoc](https://godoc.org/github.com/cryptix/jwtAuth?status.svg)](https://godoc.org/github.com/cryptix/jwtAuth)
[![Build Status](https://travis-ci.org/cryptix/jwtAuth.png?branch=master)](https://travis-ci.org/cryptix/jwtAuth)Some simple Handlers and Helpers to use [jwt-go](https://github.com/dgrijalva/jwt-go) for go http stuff.
Currently only `RS256` is supported. If you have need/ideas for key schemes to use `HS256`, contact me or open a PR.
## Working
* `MakeToken` for creating signed tokens
* `VerifyHeader` to check if a key is valid## TODO
* Make simple Handler to resign a token (extend its valdity)
* Tests MakeToken## How to get Keys
```
openssl genrsa -out app.rsa # i'd suggest 4096
openssl rsa -in app.rsa -pubout > app.rsa.pub
```