add metadata forwarder server interceptors

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2022-07-16 16:43:00 +02:00
parent 6e86120943
commit 4de0ec6a3b
2 changed files with 54 additions and 1 deletions

View File

@ -22,5 +22,5 @@ func makeTokenAuthFunc(v TokenValidator) grpc_auth.AuthFunc {
}
func NewBearerClientInterceptors(token string) interceptors.ClientInterceptors {
return metadata.NewInterceptors("authorization", "Bearer "+token)
return metadata.NewInterceptors("authorization", "bearer "+token)
}