Codebase list golang-github-go-kit-kit / c7b8e10
Fix comments for middlewares. Cameron Stitt 7 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4444 )
4545
4646 // NewSigner creates a new JWT token generating middleware, specifying key ID,
47 // signing string, signing method and the jwt.Claims you would like it to contain.
47 // signing string, signing method and the claims you would like it to contain.
4848 // Tokens are signed with a Key ID header (kid) which is useful for determining
4949 // the key to use for parsing. Particularly useful for clients.
5050 func NewSigner(kid string, key []byte, method jwt.SigningMethod, claims jwt.Claims) endpoint.Middleware {
6666 }
6767
6868 // NewParser creates a new JWT token parsing middleware, specifying a
69 // jwt.Keyfunc interface, the signing method as well as the claims to parse into.
70 // NewParserWithClaims adds the resulting claims to endpoint context or returns error on invalid token.
69 // jwt.Keyfunc interface, the signing method and the claims type to be used. NewParser
70 // adds the resulting claims to endpoint context or returns error on invalid token.
7171 // Particularly useful for servers.
7272 func NewParser(keyFunc jwt.Keyfunc, method jwt.SigningMethod, claims jwt.Claims) endpoint.Middleware {
7373 return func(next endpoint.Endpoint) endpoint.Endpoint {