goa-go / jwt

jsonwebtoken middleware for goa.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

jsonwebtoken middleware for goa.

License:MIT License


Languages

Language:Go 100.0%