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

Add required claims for generated JWT #16

Merged
merged 4 commits into from
Aug 29, 2024
Merged

Conversation

s-vitaliy
Copy link
Contributor

@s-vitaliy s-vitaliy commented Aug 29, 2024

Token generated by previous version did not have an issuer and audience claims, sot it was considered invalid by the token validator.

Scope

Implemented:

  • Changed type of the claims object in token generation process: jwt::Claims instead of HashMap<String, String>
  • Added iss and aud claims to the token

Checklist

  • GitHub issue exists for this change.
  • Unit tests added and they pass.
  • Line Coverage is at least 80%.
  • Review requested on latest commit.

Token generated by previous version did not have an issuer and audience claims, sot it was considered invalid by the token validator.
@s-vitaliy s-vitaliy requested a review from a team as a code owner August 29, 2024 08:20
Copy link

Coverage after merging add-required-claims-for-jwt into main will be

9.41%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   main.rs0%100%0%0%15, 28–39
src/http
   conversions.rs95.65%100%100%94.74%26
   urls.rs0%100%0%0%10–25, 27, 29, 8–9
src/models/external
   identity.rs0%100%0%0%13–18
   identity_provider.rs0%100%0%0%10–11, 16–18, 9
   token.rs100%100%100%100%
src/models/internal/v1
   token.rs0%100%0%0%23–32, 38, 51–54, 57–78
src/services
   configuration_manager.rs0%100%0%0%25–48, 50–52
   external_identity_validator.rs0%100%0%0%42–56, 59–67, 76–86
   identity_validator_provider.rs0%100%0%0%13–15, 46–52, 61–66, 70–73
   policy_repository.rs0%100%0%0%27–32, 36–46
   token_service.rs0%100%0%0%39–67, 71–81

@s-vitaliy s-vitaliy merged commit c70ac48 into main Aug 29, 2024
2 checks passed
@s-vitaliy s-vitaliy deleted the add-required-claims-for-jwt branch August 29, 2024 10:54
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