项目作者: tegk

项目描述 :
Example implemented of token based authentication for gRPC server and client using Interceptors
高级语言: Go
项目地址: git://github.com/tegk/grpcMiddlewareAuthentication.git
创建时间: 2019-09-27T10:38:51Z
项目社区:https://github.com/tegk/grpcMiddlewareAuthentication

开源协议:

下载


grpcMiddlewareAuthentication

This is an exemplary implementation of header-based authentication (JWT auth) using the go-grpc-middleware authentication package. The primary objective here is to demonstrate the use of AuthFuncOverride so that the middleware makes an exception for the getToken methods that must not to be authenticated.
Server and client implementation are with full code examples included, so please have a look.
Client calls the server to get a token and then calls with the issued token the greeter server.

Run server

  1. go run cmd/server/server.go

Run client

  1. go run cmd/client/client.go

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT