Skip to content

LdDl/grpc-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc Build Status Sourcegraph Go Report Card GitHub tag

grpc-jwt - JWT recipe for gRPC-based server

preamble: almost all code for JWT stuff was taken from appleyboy's repository

Table of Contents

Usage

If you are planning to use private/public keys, you should generate it first. There is example of generting RS512 keys below:

ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS512.key
openssl rsa -in jwtRS512.key -pubout -outform PEM -out jwtRS512.key.pub

If you want to re-build *.pb.go files

protoc -I . ./*.proto --go_out=./ --go-grpc_out=./ --go-grpc_opt=paths=source_relative --experimental_allow_proto3_optional

Server example

Whole example for server-side is here

How to run server-side:

go run .

Client example

Whole example for client-side is here

How to run client-side:

go run .

Support

If you have troubles or questions please open an issue. PRs are welcome!

Dependencies

  • github.com/golang-jwt/jwt - License is MIT
  • gRPC and protobuf for doing "'client-server'" application - grpc. License is Apache-2.0

License

You can check it here