File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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".
258258func 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".
268268func 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:
You can’t perform that action at this time.
0 commit comments