{"id":38593565,"url":"https://github.com/intersective/jwt-parser","last_synced_at":"2026-01-17T08:25:57.458Z","repository":{"id":40751213,"uuid":"314728005","full_name":"intersective/jwt-parser","owner":"intersective","description":"Validates a JWT with a public key, parses the token and returns the contents.","archived":false,"fork":false,"pushed_at":"2023-11-09T20:27:33.000Z","size":610,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-10-04T12:41:42.499Z","etag":null,"topics":["experiential-learning","jwt","practera"],"latest_commit_sha":null,"homepage":"https://practera.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intersective.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-21T03:56:05.000Z","updated_at":"2023-02-15T03:03:53.000Z","dependencies_parsed_at":"2023-02-06T06:32:23.433Z","dependency_job_id":null,"html_url":"https://github.com/intersective/jwt-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/intersective/jwt-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersective%2Fjwt-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersective%2Fjwt-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersective%2Fjwt-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersective%2Fjwt-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intersective","download_url":"https://codeload.github.com/intersective/jwt-parser/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intersective%2Fjwt-parser/sbom","scorecard":{"id":491586,"data":{"date":"2025-08-11","repo":{"name":"github.com/intersective/jwt-parser","commit":"a2c6201a9ba78ae2eab7841a34aca603404fd290"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":6,"reason":"Found 9/13 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code-security.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/code-security.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code-security.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/code-security.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/code-security.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/code-security.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/code-security.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/code-security.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependabotautomerge.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/dependabotautomerge.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabotautomerge.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/dependabotautomerge.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-develop.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-develop.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-develop.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-develop.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-develop.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-develop.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-develop.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-develop.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-feature.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-feature.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-feature.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-feature.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-feature.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-feature.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-feature.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-feature.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-release.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-release.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-release.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-release.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-release.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-trunk.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-trunk.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint_unitest-trunk.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-trunk.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-trunk.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-trunk.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint_unitest-trunk.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/lint_unitest-trunk.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm_package_publish.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/npm_package_publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm_package_publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/npm_package_publish.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm_package_publish.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/intersective/jwt-parser/npm_package_publish.yml/develop?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/lint_unitest-develop.yml:54","Warn: npmCommand not pinned by hash: .github/workflows/lint_unitest-feature.yml:47","Warn: npmCommand not pinned by hash: .github/workflows/lint_unitest-release.yml:47","Warn: npmCommand not pinned by hash: .github/workflows/lint_unitest-trunk.yml:48","Warn: npmCommand not pinned by hash: .github/workflows/npm_package_publish.yml:17","Info:   0 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  11 third-party GitHubAction dependencies pinned","Info:   0 out of   5 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/code-security.yml:1","Warn: no topLevel permission defined: .github/workflows/dependabotautomerge.yml:1","Warn: no topLevel permission defined: .github/workflows/lint_unitest-develop.yml:1","Warn: no topLevel permission defined: .github/workflows/lint_unitest-feature.yml:1","Warn: no topLevel permission defined: .github/workflows/lint_unitest-release.yml:1","Warn: no topLevel permission defined: .github/workflows/lint_unitest-trunk.yml:1","Warn: no topLevel permission defined: .github/workflows/npm_package_publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T19:18:30.020Z","repository_id":40751213,"created_at":"2025-08-19T19:18:30.020Z","updated_at":"2025-08-19T19:18:30.020Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: 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":["experiential-learning","jwt","practera"],"created_at":"2026-01-17T08:25:57.365Z","updated_at":"2026-01-17T08:25:57.437Z","avatar_url":"https://github.com/intersective.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @practera/jwt-parser\n\nValidates a JWT with a public key, parses the token and returns the contents.\n\n## Install\n\n```\n$ npm install @practera/jwt-parser\n```\n\n## Usage\n\n### Development Notes\n\n1. `exp` object must present in JWT payload when `CHECK_JWT_EXPIRY` is enabled (by setting 'true' in string)\n\n1. To find out JWT what content available in JWT payload, you can:\n\n    1. Use [jwt.io](https://jwt.io/)\n\n    1. in node environment run `JWT.verify(APIKEY, PUBLIC_KEY, ALGORITHM, CALLBACK);`\n\n    ```js\n      const JWT = require('jsonwebtoken');\n      JWT.verify(\n        // SAMPLE APIKEY\n        'ewoJInR5cGUiOiAiSldUIiwKCSJhbGciOiAiUlMyNTYiCn0.' +\n        'ewogICJjb250ZW50cyI6ICJjb250ZW50cyBvZiB0aGUgSldUIgp9.' +\n        'jzou9_ga85x28objtX3poBGHOQ_KgIDFDmMw0NqLDjwbNHW-2bx8P' +\n        'apVlpoRk_l5J3sd7iiZRJDfXG1fl8UmMaMaMW7zaqu6SsneaedDIH' +\n        'EmaKIM032hj-egzfsQqy1l8hoHZbc5SM2NATNrfTjP0uAvOBAljkq' +\n        'v9-5N8B4k8urDCnqcKmgNbUWyumEe5_KpmQSv-Xw5Eu05ejCZR6Ir' +\n        'sb_ShjChdrQjX57DPeoD70k4Qy6FAsUszrfcqc81upmYSD7E2kbqv' +\n        '_wK2DIr3E4yBuJUBBCVUN2_Wy8KM-xhPMBx4TiKwdan7WIKxRzBF-' +\n        'PkblOnezUVSs-efqxHxuvXlg',\n\n        // SAMPLE public key\n        '-----BEGIN PUBLIC KEY-----\\n' +\n        'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwCtQ1cAYp7tNiA0SojsVgiO9DwsLhs5Z\\n' +\n        'OEkKa72RFPBUS7fDBA2cZqJha+7ZtDnQRThIaGHnXbZSABIffAB67+jBB1sg/ublYf4mvT8qXUj2\\n' +\n        'MUs6ft7jBarIeXAo8xFC7Bdbj0GRGUsTD74ZT9R/XF3t1qYomqu9PCeRK3BwEykAVogFQ5z2D3Ki\\n' +\n        'McKPw+YmdPpzoj643fK/UrWzAVwUPTWDeLvj3JIVrYKkkbiDO2oqZzVFuZ0qBbe+9aWQW4QqAavS\\n' +\n        'AIxWszr9Wn0LontOwZ0oUBl7TiPvCb1mqMzsq4R8ghWVG/CxH4n/p2ktGwxvs+e6JGHCpCohq6SA\\n' +\n        'CU7R9wIDAQAB\\n' +\n        '-----END PUBLIC KEY-----',\n\n        { algorithms: ['RS256'] },\n        (err, payload) =\u003e {\n          if (err) throw err;\n          console.log(payload); // result: { contents: 'contents of the JWT' }\n        }\n      );\n    ```\n\n\n### Parameters\n\n`CHECK_JWT_EXPIRY` - will invalidate a JWT when the expiry timestamp (in seconds) isn't provided.\n\n### How to use?\n\nJavaScript:\n```js\nconst jwtParse = require(\"@practera/jwt-parser\");\n\njwtContents = jwtParse(\n  token, // the token to be verified and parsed\n  process.env, // environmental variables or another array of tokens that are accepted\n  service, // this will identify what public key to use to validate the token, the variable called ${service}_JWT will be used. The variable should contain a key called public and the public key as the value.\n  ['RS256'], // list of algorithms that will be used to validate the token. Default: ['RS256']\n);\n```\n\nTypeScript:\n```js\nimport jwtParse from \"@practera/jwt-parser\";\n\njwtContents = jwtParse(\n  token, // the token to be verified and parsed\n  process.env, // environmental variables or another array of tokens that are accepted\n  service, // this will identify what public key to use to validate the token, the variable called ${service}_JWT will be used. The variable should contain a key called public and the public key as the value.\n  ['RS256'], // list of algorithms that will be used to validate the token. Default: ['RS256']\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintersective%2Fjwt-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintersective%2Fjwt-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintersective%2Fjwt-parser/lists"}