Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.09 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.09 KB

jwt

jsonwebtoken-middleware for goa.

Build Status Codecov Go Doc Go Report

Installation

$ go get -u github.com/goa-go/jwt

Example

import (
  "github.com/goa-go/goa"
  "github.com/goa-go/jwt"
)

func main(){
  app = goa.New()
  app.Use(jwt.New(jwt.Options{
    Secret: "example-secret",
  }))

  ...
}

Options

Field Type Reqired Description
Secret interface{} true jwt secret
Unless []string false unless paths
GetToken func(*goa.Context) string false custom getToken function
Verify func(string, interface{}) bool false custom verify function

License

MIT