Skip to content

[Major]: JWT API/design hardening and standards alignment - #37

Closed
Marius Storhaug (MariusStorhaug) wants to merge 16 commits into
mainfrom
vigilant-fortnight
Closed

[Major]: JWT API/design hardening and standards alignment#37
Marius Storhaug (MariusStorhaug) wants to merge 16 commits into
mainfrom
vigilant-fortnight

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

Summary

  • add parameter-set driven key-generation flow (New-JwtSigningKey + New-Jwt -GenerateKey)
  • reorganize public/private functions by domain (Token, Keys, Encoding)
  • add type/format metadata for safer default display of JWT/JWK objects
  • harden JWT validation/parsing internals and align docs/examples/tests
  • update Process-PSModule workflow pin

Validation

  • full Pester suite passes locally (108 tests)

Notes

  • keeps PowerShell/.NET-native implementation (no Add-Type/manual assemblies)
  • includes per-command unit tests plus integration coverage

…JWK round-trip, and algorithm-confusion coverage
…, add Base64Url tests

- README.md: Fix MD060 table column alignment; correct 'end to end' to 'end-to-end'
- JwtPayload.ps1: Extract $autoNull variable to shorten lines below 150 chars
- New-Jwt.ps1: Break long if-condition into parenthesized $shouldDispose expression
- Test-Jwt.ps1: Extract $supportedAlgs array; use $allowed for dynamic error message;
  break long lines and fix finally-block indentation
- New-JwtHmac.ps1: Suppress PSUseShouldProcessForStateChangingFunctions, PSUseOutputTypeCorrectly
- Resolve-JwtKey.ps1, Test-JwtClaim.ps1, ConvertFrom-Base64UrlString.ps1, ConvertFrom-JwtKey.ps1,
  Get-JwtClaim.ps1: Suppress PSUseOutputTypeCorrectly (polymorphic return types)
- Jwt.Tests.ps1: Suppress PSAvoidUsingConvertToSecureStringWithPlainText and PSAvoidLongLines;
  add Base64Url helper tests (ConvertFrom-Base64UrlString coverage)
- Add New-JwtSigningKey and generated-key parameter-set flow in New-Jwt
- Add type/format metadata for safer default object display
- Optimize claim/signature validation internals and parsing
- Reorganize functions/tests by domain with updated docs/examples

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MariusStorhaug

Copy link
Copy Markdown
Member Author

Superseded by #26 for Jwt v2.0.0 release consolidation. #37 is behind the release branch and its net diff regresses already-consolidated release work (segmented test layout and KeyVault test setup). Keeping #26 as the single release PR.

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.

1 participant