{"id":53802,"library":"go-chi-jwtauth-v5","title":"JWTAuth for Chi","description":"JWT authentication middleware for the Chi router, supporting token parsing and validation.","status":"active","version":"5.4.0","language":"go","source_language":null,"source_url":"https://github.com/go-chi/jwtauth","tags":["jwt","auth","middleware","chi","web"],"install":[{"cmd":"go get github.com/go-chi/jwtauth/v5","lang":"bash","label":"Install github.com/go-chi/jwtauth/v5"}],"dependencies":[],"imports":[{"symbol":"jwtauth","correct":"github.com/go-chi/jwtauth/v5"}],"quickstart":{"code":"package main\n\nimport (\n\t\"net/http\"\n\t\"github.com/go-chi/chi/v5\"\n\t\"github.com/go-chi/jwtauth/v5\"\n)\n\nfunc main() {\n\tr := chi.NewRouter()\n\ttokenAuth := jwtauth.New(\"HS256\", []byte(\"secret\"), nil)\n\tr.Use(jwtauth.Verifier(tokenAuth))\n\tr.Get(\"/protected\", func(w http.ResponseWriter, r *http.Request) {\n\t\t_, claims, _ := jwtauth.FromContext(r.Context())\n\t\tw.Write([]byte(claims[\"sub\"].(string)))\n\t})\n\thttp.ListenAndServe(\":8080\", r)\n}","lang":"go","description":"Set up JWT authentication middleware on a Chi router."},"warnings":[{"fix":"Update import paths and review the migration guide when upgrading from v4.","message":"Breaking changes between v4 and v5: the package path changed from /v4 to /v5 and some API signatures were updated.","severity":"breaking","affected_versions":">=5.0.0"}],"env_vars":null,"search_vec":"'auth':17 'authent':5 'chi':3,9,19 'jwt':4,16 'jwtauth':1 'middlewar':6,18 'pars':13 'router':10 'support':11 'token':12 'valid':15 'web':20","created_at":"2026-06-15T07:55:53.650354+00:00","updated_at":"2026-06-15T07:55:53.650354+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/go-chi/jwtauth","github":"https://github.com/go-chi/jwtauth","docs":"https://pkg.go.dev/github.com/go-chi/jwtauth/v5#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}