vapor / jwt-kit

🔑 JSON Web Token (JWT) signing and verification (HMAC, ECDSA, EdDSA, RSA, PSS) with support for JWS and JWK
https://api.vapor.codes/jwtkit/documentation/jwtkit/
MIT License
191 stars 49 forks source link

Generic key addition #160

Closed ptoffy closed 4 months ago

ptoffy commented 5 months ago

This is a breaking changes which renames the addES256, addRS384 etc. methods to more generic ones such as addECDSA and addRSA

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 75.00000% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 77.57%. Comparing base (c4828b0) to head (a40b25b). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #160 +/- ## ========================================== + Coverage 73.56% 77.57% +4.01% ========================================== Files 59 59 Lines 1615 1400 -215 ========================================== - Hits 1188 1086 -102 + Misses 427 314 -113 ``` | [Files](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [Sources/JWTKit/ECDSA/ECDSA.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FECDSA%2FECDSA.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvRUNEU0EvRUNEU0Euc3dpZnQ=) | `85.71% <ø> (-0.29%)` | :arrow_down: | | [Sources/JWTKit/ECDSA/ECDSASigner.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FECDSA%2FECDSASigner.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvRUNEU0EvRUNEU0FTaWduZXIuc3dpZnQ=) | `90.90% <100.00%> (ø)` | | | [Sources/JWTKit/ECDSA/JWTKeyCollection+ECDSA.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FECDSA%2FJWTKeyCollection%2BECDSA.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvRUNEU0EvSldUS2V5Q29sbGVjdGlvbitFQ0RTQS5zd2lmdA==) | `100.00% <100.00%> (ø)` | | | [Sources/JWTKit/ECDSA/P256+CurveType.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FECDSA%2FP256%2BCurveType.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvRUNEU0EvUDI1NitDdXJ2ZVR5cGUuc3dpZnQ=) | `100.00% <ø> (ø)` | | | [Sources/JWTKit/ECDSA/P384+CurveType.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FECDSA%2FP384%2BCurveType.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvRUNEU0EvUDM4NCtDdXJ2ZVR5cGUuc3dpZnQ=) | `100.00% <ø> (ø)` | | | [Sources/JWTKit/ECDSA/P521+CurveType.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FECDSA%2FP521%2BCurveType.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvRUNEU0EvUDUyMStDdXJ2ZVR5cGUuc3dpZnQ=) | `100.00% <ø> (ø)` | | | [Sources/JWTKit/Utilities/CryptoSigner.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FUtilities%2FCryptoSigner.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvVXRpbGl0aWVzL0NyeXB0b1NpZ25lci5zd2lmdA==) | `100.00% <100.00%> (ø)` | | | [Sources/JWTKit/X5C/X5CVerifier.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FX5C%2FX5CVerifier.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvWDVDL1g1Q1ZlcmlmaWVyLnN3aWZ0) | `83.33% <100.00%> (-1.48%)` | :arrow_down: | | [Sources/JWTKit/HMAC/JWTKeyCollection+HMAC.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FHMAC%2FJWTKeyCollection%2BHMAC.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvSE1BQy9KV1RLZXlDb2xsZWN0aW9uK0hNQUMuc3dpZnQ=) | `91.66% <90.47%> (+58.33%)` | :arrow_up: | | [Sources/JWTKit/JWTError.swift](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree&filepath=Sources%2FJWTKit%2FJWTError.swift&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9KV1RLaXQvSldURXJyb3Iuc3dpZnQ=) | `44.06% <25.00%> (+20.48%)` | :arrow_up: | | ... and [2 more](https://app.codecov.io/gh/vapor/jwt-kit/pull/160?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | | ... and [22 files with indirect coverage changes](https://app.codecov.io/gh/vapor/jwt-kit/pull/160/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor)