diff --git a/auth/jwt/README.md b/auth/jwt/README.md index 5be5635..66520e4 100644 --- a/auth/jwt/README.md +++ b/auth/jwt/README.md @@ -57,13 +57,14 @@ In order for the parser and the signer to work, the authorization headers need to be passed between the request and the context. `ToHTTPContext()`, `FromHTTPContext()`, `ToGRPCContext()`, and `FromGRPCContext()` are given as helpers to do this. -These function impliment the correlating transport's RequestFunc interface and can be passes as ClientBefore or ServerBefore options. +These function impliment the correlating transport's RequestFunc interface and can be passed as ClientBefore or ServerBefore options. Example of use in a client: ```go import ( - stdjwt "github.com/dgrijalva/jwt-go" + stdjwt "github.com/dgrijalva/jwt-go" + grpctransport "github.com/go-kit/kit/transport/grpc" "github.com/go-kit/kit/auth/jwt" "github.com/go-kit/kit/endpoint" @@ -76,7 +77,7 @@ { jwtSigner := jwt.NewSigner("kid-header", []byte("SigningString"), stdjwt.SigningMethodHS256, jwt.Claims{}) - options = append(options, httptransport.ClientBefore(jwt.FromGRPCContext())) + options = append(options, grpctransport.ClientBefore(jwt.FromGRPCContext())) exampleEndpoint = grpctransport.NewClient( . // build client endpoint here .