Merge pull request #43 from ChristophWurst/patch-1

Fix jwt::decode documentation in readme
This commit is contained in:
Vincent Prouillet 2017-11-25 12:06:12 +01:00 committed by GitHub
commit 91c55f9623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ Look at `examples/custom_header.rs` for a full working example.
### Decoding
```rust
let token = decode::<Claims>(&token, "secret", &Validation::default())?;
let token = decode::<Claims>(&token, "secret".as_ref(), &Validation::default())?;
// token is a struct with 2 params: header and claims
```
`decode` can error for a variety of reasons: