{"id":41400239,"url":"https://github.com/napptive/njwt","last_synced_at":"2026-01-23T13:06:41.915Z","repository":{"id":45403359,"uuid":"320662711","full_name":"napptive/njwt","owner":"napptive","description":"JWT library for Napptive projects","archived":false,"fork":false,"pushed_at":"2024-01-19T10:59:58.000Z","size":251,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-01-19T12:10:46.112Z","etag":null,"topics":["grpc-interceptor","interceptors","jwt","jwt-authentication","jwt-middleware","library"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/napptive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-11T19:16:20.000Z","updated_at":"2023-03-06T15:10:16.000Z","dependencies_parsed_at":"2023-12-01T13:31:54.060Z","dependency_job_id":"96d1ca04-cd3a-426e-afd2-bcefcb79e92a","html_url":"https://github.com/napptive/njwt","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/napptive/njwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napptive%2Fnjwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napptive%2Fnjwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napptive%2Fnjwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napptive%2Fnjwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/napptive","download_url":"https://codeload.github.com/napptive/njwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/napptive%2Fnjwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28692764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grpc-interceptor","interceptors","jwt","jwt-authentication","jwt-middleware","library"],"created_at":"2026-01-23T13:06:41.835Z","updated_at":"2026-01-23T13:06:41.903Z","avatar_url":"https://github.com/napptive.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NJWT\n\nJWT library for the Napptive projects\n\nThe purpose of this project is to provide a simple JWT library to handle the authentication tokens of the Napptive platform.\n\n## Usage\n\nTo create new tokens:\n\n```go\n     pc := NewAuthxClaim(\"userID\", \"username\")\n     claim := NewClaim(\"tt\", time.Hour, pc)\n\n     secret := \"secret\"\n     token, err := tokenMgr.Generate(claim, secret)\n\n     recoveredClaim, err := tokenMgr.Recover(*token, secret, \u0026AuthxClaim{})\n     recoveredPC, ok := recClaim.PersonalClaim.(*AuthxClaim)\n```\n\n#### JWT Interceptor\n\nTo create an interceptor that validates incoming gRPC calls with a JWT on an authorization header in the context:\n\n```go\ncfg := config.JWTConfig{\n   Secret: \"mysecret\",\n   Header: \"authorization\",\n}\n\nvar s *grpc.Server\n...\ns = grpc.NewServer(interceptor.WithServerJWTInterceptor(config))\n```\n## Badges\n\n![Check changes in the Main branch](https://github.com/napptive/njwt/workflows/Check%20changes%20in%20the%20Main%20branch/badge.svg)\n\n## License\n\n Copyright 2023 Napptive\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n      https://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnapptive%2Fnjwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnapptive%2Fnjwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnapptive%2Fnjwt/lists"}