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

Use regex for bearer token validation #1998

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

divergentdave
Copy link
Collaborator

@divergentdave divergentdave requested a review from a team as a code owner September 25, 2023 22:23
Copy link
Contributor

@inahga inahga left a comment

Choose a reason for hiding this comment

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

I'm partial to either approach. This regex turns out to be not unreadable.

))
}
}
static REGEX: OnceLock<Regex> = OnceLock::new();
Copy link
Contributor

Choose a reason for hiding this comment

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

Neat-o, OnceLock was stabilized in 1.70, which is now our MSRV. We can probably drop lazy_static, with a bit of effort.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Already done in #1852 😁

Copy link
Contributor

Choose a reason for hiding this comment

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

Aha, while I was on vacation 😆

@divergentdave divergentdave force-pushed the david/bearer-token-validate-regex branch from 1cdb19c to d7147cd Compare September 26, 2023 15:28
@divergentdave divergentdave enabled auto-merge (squash) September 26, 2023 15:28
@divergentdave divergentdave merged commit 994f61e into main Sep 26, 2023
8 checks passed
@divergentdave divergentdave deleted the david/bearer-token-validate-regex branch September 26, 2023 16:45
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.

3 participants