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

API Usability enhancements #16

Merged
merged 5 commits into from
Jan 26, 2025
Merged

API Usability enhancements #16

merged 5 commits into from
Jan 26, 2025

Conversation

cmackenzie1
Copy link
Owner

No description provided.

- Add `builder()` method to `RemoteJwksDecoder` and `RemoteJwksDecoderConfig`
- Update example and test code to use new builder methods
- Streamline decoder and config creation syntax
…idation

- Add `LocalDecoderBuilder` using derive_builder
- Implement stricter configuration validation for LocalDecoder
- Add configuration error handling for empty keys, missing algorithms, and audiences
- Improve token decoding with header algorithm validation
- Update example and test code to use new builder methods
- Add tracing for decoding errors

BREAKING: Removed `From<Vec<_>>` implementation for LocalDecoder
- Enhance `Error` enum with more detailed `JwksRefresh` variant
- Add retry count and source error to JWKS refresh error
- Update `RemoteJwksDecoder::new()` to return a `Result`
- Improve error propagation and context in JWKS refresh method
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

…nd token extraction

- Add `TokenExtractor` trait for flexible token extraction
- Implement `BearerTokenExtractor` as default token extraction method
- Expand `AuthError` with comprehensive JWT-related error variants
- Improve error mapping from JWT errors to authentication errors
- Add tests for token extraction and error mapping
- Update GitHub workflow to include code coverage and linting

BREAKING CHANGE: `AuthError` enum was updated to include more failure
scenarios
Running `cargo llvm-cov nextest --profile ci` builds the project anyway.
@cmackenzie1 cmackenzie1 merged commit 2a821c7 into main Jan 26, 2025
1 check passed
@cmackenzie1 cmackenzie1 deleted the cole/enhancements branch January 26, 2025 17:59
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