Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor auth0 example #367

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Conversation

tottoto
Copy link
Contributor

@tottoto tottoto commented Jan 20, 2024

Decouples auth0 examples' pattern matching to the more flattened structure, and uses header's alg for specifying the algorithm.

let kid = match header.kid {
Some(k) => k,
None => return Err("Token doesn't have a `kid` header field".into()),
let Some(kid) = header.kid else {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since which version of Rust is that stable? First time I'm seeing that syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let-else statements is stabilized at Rust 1.65.

https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html#let-else-statements

@Keats Keats merged commit aa5266d into Keats:master Mar 13, 2024
6 checks passed
@tottoto tottoto deleted the refactor-auth0-example branch March 13, 2024 21:16
drath3000 added a commit to drath3000/jsonwebtoken_for_jws that referenced this pull request Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants