jwt: "message": "Class 'Mdanter\\Ecc\\EccFactory' not found",
Got "Class 'Mdanter\\Ecc\\EccFactory' not found"
when doing
` $signer = new \Lcobucci\JWT\Signer\Ecdsa\Sha256();
$token = (new Builder())->setIssuer('http://example.com') // Configures the issuer (iss claim)
->setAudience('http://example.org') // Configures the audience (aud claim)
->setId('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item
->setIssuedAt(time()) // Configures the time that the token was issue (iat claim)
->setExpiration(time() + 3600) // Configures the expiration time of the token (nbf claim)
->set('uid', 1) // Configures a new claim, called "uid"
->sign($signer, $privateKey) // creates a signature using your private key
->getToken(); // Retrieves the generated token`
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (5 by maintainers)
Whenever it’s done 😃
@michaelchemani if you look at packagist
mdanter/ecc
is not required as default it’s just suggested (and installed for development so that we can run the tests).The stable version of
lcobucci/jwt
is only compatible withmdanter/ecc: ~0.3.1
(that was already fixed on4.0.x-dev
and it’s planned to be fixed on #137).This means that if you want to use ECDSA you must do
composer require mdanter/ecc:~0.3.1
.