Skip to content

v1.0.0-alpha1

@spajxo spajxo tagged this 24 Jul 08:22
* refactor: Rename ParamsTrait to ClaimsTrait for semantic accuracy

This change improves semantic clarity by renaming ParamsTrait to ClaimsTrait,
better reflecting that these are OpenID Connect/JWT claims rather than generic parameters.

Key changes:
- Renamed trait ParamsTrait → ClaimsTrait
- Renamed abstract method all() → claims()
- Updated all implementing classes to use claims() method
- Updated documentation and error messages to use "claim" terminology
- Updated test files and class names accordingly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Add methods to extract JWT claims in JwtAccessToken

* refactor: Update test class documentation to reflect ClaimsTrait usage

* refactor: Consolidate JWT creation helpers to eliminate duplication

Remove duplicate createJwtString() method from JwtAccessTokenValidatorTest
and replace all calls with the inherited createCustomJwt() method from TestCase.

Key improvements:
- Eliminated 18 lines of duplicate JWT creation logic
- Fixed Base64 encoding compliance - now uses Base64Url per RFC 7519
- Consolidated to single JWT creation helper for consistency
- All 384 tests pass with proper JWT-compliant tokens

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Rename test method to reflect ClaimsTrait integration

* refactor: Update test methods to reflect ClaimsTrait integration

* refactor: Remove redundant test method from IdTokenTest

* test: Add comprehensive test coverage for JwtAccessToken class

Created JwtAccessTokenTest.php with complete test coverage for the
JwtAccessToken class, addressing a significant test coverage gap.

Coverage includes:
- Basic functionality tests (constructor, toString, claims)
- Individual claim method tests for all 9 public methods
- ClaimsTrait integration testing
- Error scenarios with data providers (invalid types, missing claims)
- Real-world JWT structure testing

Test metrics:
- 30 new tests with 56 assertions
- Total test suite: 413 tests, 1090 assertions
- Full code coverage for JwtAccessToken class

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Assets 2
Loading