# jwk-allowed-algorithms

> Get an array of algorithms allowed to be used with a JWK.

Latest version **1.0.0** (published 2015-06-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install jwk-allowed-algorithms
pnpm add jwk-allowed-algorithms
yarn add jwk-allowed-algorithms
bun add jwk-allowed-algorithms
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-06-10 |
| First published | 2015-06-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | D2L Corporation |
| Maintainers | d2l-travis-deploy |
| Keywords | jwt, jwk, jwa, jsonwebtoken |

## Links

- npm: https://www.npmjs.com/package/jwk-allowed-algorithms
- Repository: https://github.com/Brightspace/node-jwk-allowed-algorithms
- Homepage: https://github.com/Brightspace/node-jwk-allowed-algorithms#readme
- Issues: https://github.com/Brightspace/node-jwk-allowed-algorithms/issues
- npm.io page: https://npm.io/package/jwk-allowed-algorithms

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-06-10

## README

# jwk-allowed-algorithms

[![Build Status](https://travis-ci.org/Brightspace/node-jwk-allowed-algorithms.svg?branch=master)](https://travis-ci.org/Brightspace/node-jwk-allowed-algorithms) [![Coverage Status](https://coveralls.io/repos/Brightspace/node-jwk-allowed-algorithms/badge.svg)](https://coveralls.io/r/Brightspace/node-jwk-allowed-algorithms)

A tiny library to provide a list of [jwa algorithms][algs] allowed to be used
with a particular [json web key][jwk].

## Install
```sh
npm install jwk-allowed-algorithms --save
```

## Usage
```js
var getAllowedAlorithms = require('jwk-allowed-algorithms'),
	jwt = require('jsonwebtoken');

var jwk = { kty: 'EC', crv: 'P-256', x: '...', y: '...' },
	pem = jwkToPem(jwk);

var allowedAlgorithms = getAllowedAlorithms(jwk); // ['ES256']

jwt.verify(token, pem, { algorithms: allowedAlgorithms });
```

## Contributing

1. **Fork** the repository. Committing directly against this repository is
   highly discouraged.

2. Make your modifications in a branch, updating and writing new unit tests
   as necessary in the `spec` directory.

3. Ensure that all tests pass with `npm test`

4. `rebase` your changes against master. *Do not merge*.

5. Submit a pull request to this repository. Wait for tests to run and someone
   to chime in.

### Code Style

This repository is configured with [EditorConfig][EditorConfig], [jscs][jscs]
and [JSHint][JSHint] rules.

[algs]: https://tools.ietf.org/html/rfc7518#section-3.1
[jwk]: https://tools.ietf.org/html/rfc7517
[EditorConfig]: http://editorconfig.org/
[jscs]: http://jscs.info/
[JSHint]: http://jshint.com/

---
_Source: https://npm.io/package/jwk-allowed-algorithms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
