{"id":19432718,"url":"https://github.com/brightspace/node-jwk-to-pem","last_synced_at":"2025-05-15T04:00:33.717Z","repository":{"id":33458823,"uuid":"37104297","full_name":"Brightspace/node-jwk-to-pem","owner":"Brightspace","description":"Convert a json web key to a PEM for use by OpenSSL or crytpo","archived":false,"fork":false,"pushed_at":"2024-11-25T16:00:02.000Z","size":84,"stargazers_count":152,"open_issues_count":10,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T22:14:31.889Z","etag":null,"topics":["nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Brightspace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-09T02:06:25.000Z","updated_at":"2025-04-07T12:52:04.000Z","dependencies_parsed_at":"2023-02-16T07:15:20.957Z","dependency_job_id":"54308858-fa25-496d-980e-fa7fba850b33","html_url":"https://github.com/Brightspace/node-jwk-to-pem","commit_stats":{"total_commits":80,"total_committers":9,"mean_commits":8.88888888888889,"dds":0.125,"last_synced_commit":"1e0c3697e522a47ca68b045e49cb87b899a3c752"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Fnode-jwk-to-pem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Fnode-jwk-to-pem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Fnode-jwk-to-pem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brightspace%2Fnode-jwk-to-pem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brightspace","download_url":"https://codeload.github.com/Brightspace/node-jwk-to-pem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968917,"owners_count":21191162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["nodejs"],"created_at":"2024-11-10T14:36:49.486Z","updated_at":"2025-04-14T22:14:35.236Z","avatar_url":"https://github.com/Brightspace.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jwk-to-pem\n\n[![Build Status](https://travis-ci.org/Brightspace/node-jwk-to-pem.svg?branch=master)](https://travis-ci.org/Brightspace/node-jwk-to-pem) [![Coverage Status](https://coveralls.io/repos/Brightspace/node-jwk-to-pem/badge.svg)](https://coveralls.io/r/Brightspace/node-jwk-to-pem)\n\nConvert a [json web key][jwk] to a PEM for use by OpenSSL or `crypto`.\n\n## Install\n```sh\nnpm install jwk-to-pem --save\n```\n\n## Usage\n```js\nvar jwkToPem = require('jwk-to-pem'),\n\tjwt = require('jsonwebtoken');\n\nvar jwk = { kty: 'EC', crv: 'P-256', x: '...', y: '...' },\n\tpem = jwkToPem(jwk);\n\njwt.verify(token, pem);\n```\n\n### Support\n\nkey type | support level\n---------|--------------\n RSA     | all RSA keys\n EC      | _P-256_, _P-384_, and _P-521_ curves\n\n### API\n\n---\n\n#### `jwkToPem(Object jwk[, Object options])` -\u003e `String`\n\nThe first parameter should be an Object representing the jwk, it may be public\nor private. By default, either of the two will be made into a public PEM. The\ncall will throw if the input jwk is malformed or does not represent a valid\nkey.\n\n##### Option: private `Boolean` _(false)_\n\nYou may optionally specify that you would like a private PEM. This can be done\nby passing `true` to the `private` option. The call will throw if the necessary\nprivate parameters are not available.\n\n\n## Contributing\n\n1. **Fork** the repository. Committing directly against this repository is\n   highly discouraged.\n\n2. Make your modifications in a branch, updating and writing new unit tests\n   as necessary in the `spec` directory.\n\n3. Ensure that all tests pass with `npm test`\n\n4. `rebase` your changes against master. *Do not merge*.\n\n5. Submit a pull request to this repository. Wait for tests to run and someone\n   to chime in.\n\n### Code Style\n\nThis repository is configured with [EditorConfig][EditorConfig] and\n[ESLint][ESLint] rules.\n\n[algs]: https://tools.ietf.org/html/rfc7518#section-3.1\n[jwk]: https://tools.ietf.org/html/rfc7517\n[EditorConfig]: http://editorconfig.org/\n[ESLint]: http://eslint.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightspace%2Fnode-jwk-to-pem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrightspace%2Fnode-jwk-to-pem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightspace%2Fnode-jwk-to-pem/lists"}