Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Commit

Permalink
Fix documentation for allowed_algs (has to be an array)
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed Nov 18, 2017
1 parent 96fea46 commit d3a1436
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -279,7 +279,7 @@ jsjws-slow|1,177|1,176,602|532

- `{String} jws` The JSON Web Signature to verify.
- `{PublicKey} key` The public key to be used to verify the signature. For `HS256` and `HS512`, pass a string or `Buffer`. Note: if you pass `null` and `allowed_algs` contains `none` then the signature will not be verified.
- `{Array | Object} allowed_algs` Algorithms expected to be used to sign the signature. If you pass an `Object` then its properties define the set of algorithms expected.
- `{Array} allowed_algs` Algorithms expected to be used to sign the signature.

**Return:**

Expand Down Expand Up @@ -396,7 +396,7 @@ Inherits from [JWS](#jws).
- `{Boolean} checks_optional` Whether the token must contain the `typ` header property and the `iat`, `nbf` and `exp` claim properties. Defaults to `false`.

- `{PublicKey} key` The public key to be used to verify the token. For `HS256` and `HS512`, pass a string or `Buffer`. Note: if you pass `null` and `allowed_algs` contains `none` then the token's signature will not be verified.
- `{Array | Object} allowed_algs` Algorithms expected to be used to sign the token. If you pass an `Object` then its properties define the set of algorithms expected.
- `{Array} allowed_algs` Algorithms expected to be used to sign the token.

**Return:**

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "jsjws",
"description": "Wraps jsrsasign (http://kjur.github.io/jsrsasign/) and uses Node crypto routines for performance",
"version": "5.0.0",
"version": "5.0.1",
"homepage": "https://github.com/davedoesdev/node-jsjws",
"author": {
"name": "David Halls",
Expand Down
4 changes: 2 additions & 2 deletions wrap/docs.js
Expand Up @@ -208,7 +208,7 @@ Verify a JSON Web Signature.
@param {PublicKey} key The public key to be used to verify the signature. For `HS256` and `HS512`, pass a string or `Buffer`. Note: if you pass `null` and `allowed_algs` contains `none` then the signature will not be verified.
@param {Array|Object} allowed_algs Algorithms expected to be used to sign the signature. If you pass an `Object` then its properties define the set of algorithms expected.
@param {Array} allowed_algs Algorithms expected to be used to sign the signature.
@return {Boolean} `true` if the signature was verified successfully. The JWS must pass the following tests:
Expand Down Expand Up @@ -310,7 +310,7 @@ Verify a JSON Web Token.
@param {PublicKey} key The public key to be used to verify the token. For `HS256` and `HS512`, pass a string or `Buffer`. Note: if you pass `null` and `allowed_algs` contains `none` then the token's signature will not be verified.
@param {Array|Object} allowed_algs Algorithms expected to be used to sign the token. If you pass an `Object` then its properties define the set of algorithms expected.
@param {Array} allowed_algs Algorithms expected to be used to sign the token.
@return {Boolean} `true` if the token was verified successfully. The token must pass the following tests:
Expand Down

0 comments on commit d3a1436

Please sign in to comment.