1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-03-17 20:28:06 +02:00

Add AuthCall wrapper func (#2250)

* Add grpc,memory,quic transport automatically discover

* Add grpc,memory,quic transport automatically discover

* Add jwt auth automatically discover

* Add jwt auth automatically discover

* Add config command option automatically discover

* Add AuthCall wrapper func
This commit is contained in:
simon 2021-09-07 14:13:56 +08:00 committed by GitHub
parent f77c91b7ae
commit 440aa4a1ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,6 +128,10 @@ func TraceHandler(t trace.Tracer) server.HandlerWrapper {
}
}
func AuthCall(a func() auth.Auth, c client.Client) client.Client {
return &authWrapper{Client:c, auth: a}
}
type authWrapper struct {
client.Client
auth func() auth.Auth