Codebase list golang-github-go-kit-kit / 3e88313
auth/jwt: fix doc grammar Peter Bourgon 6 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1616 bearerFormat string = "Bearer %s"
1717 )
1818
19 // HTTPToContext moves JWT token from request header to context. Particularly
19 // HTTPToContext moves a JWT from request header to context. Particularly
2020 // useful for servers.
2121 func HTTPToContext() http.RequestFunc {
2222 return func(ctx context.Context, r *stdhttp.Request) context.Context {
2929 }
3030 }
3131
32 // ContextToHTTP moves JWT token from context to request header. Particularly
32 // ContextToHTTP moves a JWT from context to request header. Particularly
3333 // useful for clients.
3434 func ContextToHTTP() http.RequestFunc {
3535 return func(ctx context.Context, r *stdhttp.Request) context.Context {
4141 }
4242 }
4343
44 // GRPCToContext moves JWT token from grpc metadata to context. Particularly
44 // GRPCToContext moves a JWT from grpc metadata to context. Particularly
4545 // userful for servers.
4646 func GRPCToContext() grpc.ServerRequestFunc {
4747 return func(ctx context.Context, md metadata.MD) context.Context {
6060 }
6161 }
6262
63 // ContextToGRPC moves JWT token from context to grpc metadata. Particularly
63 // ContextToGRPC moves a JWT from context to grpc metadata. Particularly
6464 // useful for clients.
6565 func ContextToGRPC() grpc.ClientRequestFunc {
6666 return func(ctx context.Context, md *metadata.MD) context.Context {