{"versions":{"0.1.0":{"name":"@oslojs/jwt","type":"module","version":"0.1.0","description":"Parse and encoding JSON web tokens","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","keywords":["auth","jwt"],"repository":{"type":"git","url":"git+https://github.com/oslo-project/jwt.git"},"author":{"name":"pilcrowOnPaper"},"license":"MIT","devDependencies":{"@types/node":"^20.8.6","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.7.5","auri":"^2.0.0","eslint":"^8.51.0","prettier":"^3.0.3","typescript":"^5.2.2","vitest":"^0.34.6"},"dependencies":{"@oslojs/encoding":"0.4.1"},"scripts":{"build":"rm -rf dist/* && tsc --project tsconfig.build.json","format":"prettier -w .","lint":"eslint src","test":"vitest run --sequence.concurrent"},"bugs":{"url":"https://github.com/oslo-project/jwt/issues"},"homepage":"https://github.com/oslo-project/jwt#readme","_id":"@oslojs/jwt@0.1.0","_integrity":"sha512-g6JHWeCl9OkHLeoaaKUZoQUfCzhn2U5hYnyoT7/Uh/HY0AGpf0odmFViW6AhPKaOOVXKITvoOArEhec1vEd6GA==","_resolved":"/private/var/folders/qb/z2pf2nq559n552wvjqbjddww0000gn/T/897eb71ca460dae8f4a41d7d8de3b794/oslojs-jwt-0.1.0.tgz","_from":"file:oslojs-jwt-0.1.0.tgz","_nodeVersion":"21.7.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-g6JHWeCl9OkHLeoaaKUZoQUfCzhn2U5hYnyoT7/Uh/HY0AGpf0odmFViW6AhPKaOOVXKITvoOArEhec1vEd6GA==","shasum":"c8e4408f4667620ddc9f8a67ba5feca73f191482","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@oslojs/jwt/-/jwt-0.1.0.tgz","fileCount":5,"unpackedSize":14508,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC0LcwBBSxPdVDxzDrZA23KeAvmkroe6hxJy99+HW/hbAiEA1w+48QxtdC2AYPPELzpx6EdG3KInEdI1ZIRu+ljSRbc="}],"size":3523},"_npmUser":{"name":"anonymous","email":"pilcrowonpaper@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"pilcrowonpaper@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jwt_0.1.0_1726483066203_0.26559943015611953"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-09-16T10:37:46.337Z","publish_time":1726483066337,"_source_registry_name":"default","contributors":[]},"0.2.0":{"name":"@oslojs/jwt","type":"module","version":"0.2.0","description":"Parse and encoding JSON web tokens","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","keywords":["auth","jwt"],"repository":{"type":"git","url":"git+https://github.com/oslo-project/jwt.git"},"author":{"name":"pilcrowOnPaper"},"license":"MIT","devDependencies":{"@types/node":"^20.8.6","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.7.5","auri":"^2.0.0","eslint":"^8.51.0","prettier":"^3.0.3","typescript":"^5.2.2","vitest":"^0.34.6"},"dependencies":{"@oslojs/encoding":"0.4.1"},"scripts":{"build":"rm -rf dist/* && tsc --project tsconfig.build.json","format":"prettier -w .","lint":"eslint src","test":"vitest run --sequence.concurrent"},"bugs":{"url":"https://github.com/oslo-project/jwt/issues"},"homepage":"https://github.com/oslo-project/jwt#readme","_id":"@oslojs/jwt@0.2.0","_integrity":"sha512-bLE7BtHrURedCn4Mco3ma9L4Y1GR2SMBuIvjWr7rmQ4/W/4Jy70TIAgZ+0nIlk0xHz1vNP8x8DCns45Sb2XRbg==","_resolved":"/private/var/folders/qb/z2pf2nq559n552wvjqbjddww0000gn/T/e08a834921c4e9608d600a6e0cc4675c/oslojs-jwt-0.2.0.tgz","_from":"file:oslojs-jwt-0.2.0.tgz","_nodeVersion":"21.7.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-bLE7BtHrURedCn4Mco3ma9L4Y1GR2SMBuIvjWr7rmQ4/W/4Jy70TIAgZ+0nIlk0xHz1vNP8x8DCns45Sb2XRbg==","shasum":"cdcd51e562eed2e536d273c840e90648c2d4a54a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@oslojs/jwt/-/jwt-0.2.0.tgz","fileCount":5,"unpackedSize":15317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSnFfy9vbclI1P3zdqhuCQCyvwih6Fr7cqd4/8P1EGZAIgBVewz1qQYDtPaDlTDpBJLhOWf5la9nH6FDtE45RP/m4="}],"size":3595},"_npmUser":{"name":"anonymous","email":"pilcrowonpaper@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"pilcrowonpaper@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jwt_0.2.0_1726666222374_0.7208315139681456"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-09-18T13:30:22.543Z","publish_time":1726666222543,"_source_registry_name":"default","contributors":[]},"0.3.0":{"name":"@oslojs/jwt","type":"module","version":"0.3.0","description":"Parse and encoding JSON web tokens","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","keywords":["auth","jwt"],"repository":{"type":"git","url":"git+https://github.com/oslo-project/jwt.git"},"author":{"name":"pilcrowOnPaper"},"license":"MIT","devDependencies":{"@types/node":"^20.8.6","@typescript-eslint/eslint-plugin":"^6.7.5","@typescript-eslint/parser":"^6.7.5","auri":"^2.0.0","eslint":"^8.51.0","prettier":"^3.0.3","typescript":"^5.2.2","vitest":"^0.34.6"},"dependencies":{"@oslojs/encoding":"0.4.1"},"scripts":{"build":"rm -rf dist/* && tsc --project tsconfig.build.json","format":"prettier -w .","lint":"eslint src","test":"vitest run --sequence.concurrent"},"_id":"@oslojs/jwt@0.3.0","bugs":{"url":"https://github.com/oslo-project/jwt/issues"},"homepage":"https://github.com/oslo-project/jwt#readme","_integrity":"sha512-bg9hh6gc7ppS2haLv2nE7oezroXK6a6zGTz6JzCHXAQKCOOZM4HfOrV9DwCaDimrTcDi1nHAe2ueAAxZ23eeUA==","_resolved":"/private/var/folders/qb/z2pf2nq559n552wvjqbjddww0000gn/T/b44119308a2a1954fc7543e068ecfc3f/oslojs-jwt-0.3.0.tgz","_from":"file:oslojs-jwt-0.3.0.tgz","_nodeVersion":"22.10.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-bg9hh6gc7ppS2haLv2nE7oezroXK6a6zGTz6JzCHXAQKCOOZM4HfOrV9DwCaDimrTcDi1nHAe2ueAAxZ23eeUA==","shasum":"10e1cabdb86338f9ec968d182e20fce29531c7ea","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@oslojs/jwt/-/jwt-0.3.0.tgz","fileCount":5,"unpackedSize":15337,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoLClL4HJ9Wc2fs01LMxeZacM1MEM4bbSrFOyg0lsjpgIgIZXaWKzOtOJxXVOzp7lcvsgzGvSF1y48uFDasjBzQ9o="}],"size":3594},"_npmUser":{"name":"anonymous","email":"pilcrowonpaper@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"pilcrowonpaper@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jwt_0.3.0_1732340863131_0.928460027123555"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-11-23T05:47:43.359Z","publish_time":1732340863359,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.3.0"},"name":"@oslojs/jwt","time":{"created":"2024-09-16T11:20:32.107Z","modified":"2024-11-23T05:49:07.457Z","0.1.0":"2024-09-16T10:37:46.337Z","0.2.0":"2024-09-18T13:30:22.543Z","0.3.0":"2024-11-23T05:47:43.359Z"},"readme":"# @oslojs/jwt\n\n**Documentation: https://jwt.oslojs.dev**\n\nA JavaScript library for parsing and encoding JSON web tokens (JWT) by [Oslo](https://oslojs.dev). Only signed tokens are supported.\n\n- Runtime-agnostic\n- No third-party dependencies\n- Fully typed\n\n```ts\nimport { parseJWT, JWSRegisteredHeaders, JWTRegisteredClaims, joseAlgorithmHS256 } from \"@oslojs/jwt\";\n\nconst [header, payload, signature] = parseJWT(jwt);\nconst headerParameters = new JWSRegisteredHeaders(header);\nif (header.algorithm() !== joseAlgorithmHS256) {\n\tthrow new Error(\"Unsupported algorithm\");\n}\nconst claims = new JWTRegisteredClaims(payload);\nif (!claims.verifyExpiration()) {\n\tthrow new Error(\"Expired token\");\n}\nif (claims.hasNotBefore() && !claims.verifyNotBefore()) {\n\tthrow new Error(\"Invalid token\");\n}\n```\n\n## Installation\n\n```\nnpm i @oslojs/jwt\n```","users":{}}