Comments (6)
@rdkls thank you for the additional information here. I will add this to be investigated.
from okta-jwt-verifier-php.
@rdkls I have pushed an update to develop that will throw a Domain exception if there is no jwks_uri in the metadata.
from okta-jwt-verifier-php.
Thanks.
What is process to update package list?
Still pointing to 1.0 here
https://packagist.org/packages/okta/jwt-verifier
thanks
from okta-jwt-verifier-php.
@elmacho777 can you please go into more detail of what is showing you that error? I am confused by where that error is coming from.
from okta-jwt-verifier-php.
I just had exactly the same issue. It happens if you're not paying for / using a customer auth server, as only custom auth servers metadata contain jwks_uri.
The problem is in JwtVerifier.php __construct
It retrieves metadata like so:
$this->metaData = json_decode($request->setUrl($this->issuer.$this->discovery->getWellKnown())->get()->getBody());
And just assumes the response contains jwks_uri. Which it only does for custom auth servers i.e. your base uri is of form https://${yourOktaDomain}/oauth2/${authServerId}
NOT https://${yourOktaDomain}/oauth2
Then, in verify() it attempts to retrieve the (null) jwks_uri and gets that error
Traceback like so:
[16-Jul-2020 07:11:58 UTC] PHP Fatal error: Uncaught InvalidArgumentException: URI must be a string or UriInterface in (php-dir)/vendor/guzzlehttp/psr7/src/functions.php:62
Stack trace:
#0 (php-dir)/vendor/php-http/message/src/UriFactory/GuzzleUriFactory.php(20): GuzzleHttp\Psr7\uri_for(NULL)
#1 (php-dir)/vendor/okta/jwt-verifier/src/Request.php(65): Http\Message\UriFactory\GuzzleUriFactory->createUri(NULL)
#2 (php-dir)/vendor/okta/jwt-verifier/src/Adaptors/FirebasePhpJwt.php(39): Okta\JwtVerifier\Request->setUrl(NULL)
#3 (php-dir)/vendor/okta/jwt-verifier/src/JwtVerifier.php(94): Okta\JwtVerifier\Adaptors\FirebasePhpJwt->getKeys(NULL)
#4 (php-dir)/index.php(447): Okta\JwtVerifier\JwtVerifier->verif in (php-dir)/vendor/guzzlehttp/psr7/src/functions.php on line 62
from okta-jwt-verifier-php.
Internal Ref: OKTA-314097
from okta-jwt-verifier-php.
Related Issues (20)
- Make the cache ttl compatible with Symfony HOT 1
- Leeway is not working HOT 1
- validating jwt from client credentials flow HOT 5
- Getting "DiscoveryFailedException" when trying to verify jwt. HOT 3
- improve `DiscoveryMethod` classes HOT 1
- Nonce does not match what is expected HOT 5
- Lax validation when parts are not specified HOT 1
- PHP 8 Support? HOT 14
- Undefined index: cid HOT 13
- ClassInstantiationFailedException: Unexpected exception when instantiating class HOT 3
- OpenID KEY caching HOT 7
- JwtVerifierBuilder : checks HOT 2
- validateClaims() called without type from verify() HOT 3
- PHP Fatal error: Uncaught Http\Discovery\Exception\DiscoveryFailedException: Could not find resource using any discovery strategy HOT 5
- OKTA SAML2 support HOT 1
- UnexpectedValueException: "kid" invalid, unable to lookup correct key HOT 2
- Don't make client_id validation required
- Are there any plans for PHP 8.1 support in the near future? HOT 3
- Understanding JwT verification - Expiration Time and Signature HOT 2
- firebase / php-jwt v6 incompatible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okta-jwt-verifier-php.