go-with-jwt

command module
v0.0.0-...-fbbe154 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2018 License: MIT Imports: 2 Imported by: 0

README

GO with JWT

This is an example project to give you some hints in order to integrate jwt authentication with Buffalo.

There is a blog post on Medium that explains part of the code you'll find here.

Starting the Application

You can run the app with:

$ JWT_KEY_PATH=/{project-path}/jwtRS256.key buffalo dev

Two routes are set:

// Requires email and password. Response contains a JWT token
$ POST http://127.0.0.1:3000/api/v1/auth/login

// Requires JWT token set in Authorization header
$ GET http://127.0.0.1:3000/api/v1/users/me 

Testing the Application

You can run tests with:

$ JWT_KEY_PATH=/{project-path}/jwtRS256.key buffalo test

Contributing

PRs are very welcome to improve the project as it may be used by many developers to get started with a JWT base Buffalo app.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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