Skip to content

Commit

Permalink
docs: fix documentation of signedCookie return value
Browse files Browse the repository at this point in the history
fixes #32
  • Loading branch information
dougwilson committed Nov 9, 2016
1 parent 007fe69 commit ac33290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Given an object, this will iterate over the keys and call `JSONCookie` on each v

### cookieParser.signedCookie(str, secret)

Parse a cookie value as a signed cookie. This will return the parsed unsigned value if it was a signed cookie and the signature was valid, otherwise it will return the passed value.
Parse a cookie value as a signed cookie. This will return the parsed unsigned value if it was a signed cookie and the signature was valid. If the value was not signed, the original value is returned. If the value was signed but the signature could not be validated, `false` is returned.

The `secret` argument can be an array or string. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.

Expand Down

0 comments on commit ac33290

Please sign in to comment.