Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c7b8e10

Browse files
Fix comments for middlewares.
1 parent 8147bc1 commit c7b8e10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎auth/jwt/middleware.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var (
4545
)
4646

4747
// NewSigner creates a new JWT token generating middleware, specifying key ID,
48-
// signing string, signing method and the jwt.Claims you would like it to contain.
48+
// signing string, signing method and the claims you would like it to contain.
4949
// Tokens are signed with a Key ID header (kid) which is useful for determining
5050
// the key to use for parsing. Particularly useful for clients.
5151
func NewSigner(kid string, key []byte, method jwt.SigningMethod, claims jwt.Claims) endpoint.Middleware {
@@ -67,8 +67,8 @@ func NewSigner(kid string, key []byte, method jwt.SigningMethod, claims jwt.Clai
6767
}
6868

6969
// NewParser creates a new JWT token parsing middleware, specifying a
70-
// jwt.Keyfunc interface, the signing method as well as the claims to parse into.
71-
// NewParserWithClaims adds the resulting claims to endpoint context or returns error on invalid token.
70+
// jwt.Keyfunc interface, the signing method and the claims type to be used. NewParser
71+
// adds the resulting claims to endpoint context or returns error on invalid token.
7272
// Particularly useful for servers.
7373
func NewParser(keyFunc jwt.Keyfunc, method jwt.SigningMethod, claims jwt.Claims) endpoint.Middleware {
7474
return func(next endpoint.Endpoint) endpoint.Endpoint {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /