okta-jwt-verifier-php
okta-jwt-verifier-php copied to clipboard
Types and improvements
Build on https://github.com/okta/okta-jwt-verifier-php/pull/61 and adds some additional improvements. Separated in a new PR because they are not all BC (if people have extended classes they must also add the new type info).
- renamed
DiscoveryMethodInterface
toDiscoveryMethod
analog to howAdaptor
is set up - extracted server config (issuer, metadata and jwks loading) from verifier
- added unit tests for almost every class, including ssl certificate parsing
- added namespacing for unit tests
- added type info where possible, added docblocks where possible
- consistent spaces in
if
andforeach
- added docker file to run tests locally
- updated README
Codecov Report
Merging #62 (3c06483) into develop (e432999) will increase coverage by
59.07%
. The diff coverage is92.70%
.
@@ Coverage Diff @@
## develop #62 +/- ##
==============================================
+ Coverage 33.77% 92.85% +59.07%
- Complexity 98 110 +12
==============================================
Files 9 10 +1
Lines 225 238 +13
==============================================
+ Hits 76 221 +145
+ Misses 149 17 -132
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
src/Server/Discovery/Oauth.php | 100.00% <ø> (ø) |
1.00 <0.00> (?) |
|
src/Adaptor/AutoDiscover.php | 66.66% <50.00%> (ø) |
4.00 <0.00> (?) |
|
src/Adaptor/FirebasePhpJwt.php | 84.50% <84.61%> (ø) |
26.00 <26.00> (?) |
|
src/Server/DefaultServer.php | 91.17% <91.17%> (ø) |
18.00 <18.00> (?) |
|
src/Jwt.php | 95.23% <93.75%> (+95.23%) |
11.00 <7.00> (ø) |
|
src/JwtVerifier.php | 100.00% <100.00%> (+63.41%) |
19.00 <16.00> (-3.00) |
:arrow_up: |
src/JwtVerifierBuilder.php | 100.00% <100.00%> (+32.00%) |
19.00 <15.00> (ø) |
|
src/Request.php | 100.00% <100.00%> (ø) |
9.00 <0.00> (ø) |
|
src/Server/Discovery/DefaultDiscovery.php | 100.00% <100.00%> (ø) |
2.00 <2.00> (?) |
|
src/Server/Discovery/Oidc.php | 100.00% <100.00%> (ø) |
1.00 <1.00> (?) |
|
... and 5 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update e432999...3c06483. Read the comment docs.
Thank you for the PR, we would need to have you sign a cla for this to be merged in after we do our internal review.
You can begin the cla process now by visiting developer.okta.com/cla
I have sent in the CLA, not sure how it will be linked to my github account though
Thanks @ctrl-f5 we manage the CLA's externally right now. I see the CLA and will add this PR to our tasks to look at and possibly be merged in