Skip to content

Commit 9db20b6

Browse files
committed
Fix typos
1 parent f399db5 commit 9db20b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jwtauth.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func SetExpiryIn(claims map[string]interface{}, tm time.Duration) {
253253
claims["exp"] = ExpireIn(tm)
254254
}
255255

256-
// TokenFromCookie tries to retreive the token string from a cookie named
256+
// TokenFromCookie tries to retrieve the token string from a cookie named
257257
// "jwt".
258258
func TokenFromCookie(r *http.Request) string {
259259
cookie, err := r.Cookie("jwt")
@@ -263,8 +263,8 @@ func TokenFromCookie(r *http.Request) string {
263263
return cookie.Value
264264
}
265265

266-
// TokenFromHeader tries to retreive the token string from the
267-
// "Authorization" reqeust header: "Authorization: BEARER T".
266+
// TokenFromHeader tries to retrieve the token string from the
267+
// "Authorization" request header: "Authorization: BEARER T".
268268
func TokenFromHeader(r *http.Request) string {
269269
// Get token from authorization header.
270270
bearer := r.Header.Get("Authorization")
@@ -274,7 +274,7 @@ func TokenFromHeader(r *http.Request) string {
274274
return ""
275275
}
276276

277-
// TokenFromQuery tries to retreive the token string from the "jwt" URI
277+
// TokenFromQuery tries to retrieve the token string from the "jwt" URI
278278
// query parameter.
279279
//
280280
// To use it, build our own middleware handler, such as:

0 commit comments

Comments
 (0)