jwt

command
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

Web Application with JWT

This is the web application with JWT.

main.go
package main

import (
	"hidevops.io/hiboot/pkg/starter/web"
	_ "hidevops.io/hiboot/examples/web/jwt/controllers"
)

func main()  {
	// create new web application and run it
	web.NewApplication().Run()
}
run unit test
go test ./...
run the example code
go run main.go
curl -H 'Accept-Language: cn-ZH' -H """Authorization: Bearer $(curl -d '{"username":"test","password":"123"}' -H "Content-Type: application/json" -X POST http://localhost:8080/foo/login 2>/dev/null | jq -r '.data') """ http://localhost:8080/bars/sayHello

# here is the output
{"code":200,"message":"成功","data":{"Greeting":"hello bar"}}

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