Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #1184 Wrong type exception for AccessTokenLoader with certain con…
…figuration (Julius Böllmann) This PR was merged into the 2.x branch. Discussion ---------- Wrong type exception for AccessTokenLoader with certain configuration If I use the feature "webtoken" with that bundle than the following configuration (only signing jwk but not encrypting), leads to an exception when the Encoder is loader and Dependencies are injected. ``` lexik_jwt_authentication: public_key: '%env(resolve:JWT_PUBLIC_KEY)%' encoder: service: lexik_jwt_authentication.encoder.web_token access_token_issuance: enabled: true signature: algorithm: EdDSA key: '%env(SIGNATURE_KEY)%' access_token_verification: enabled: true signature: allowed_algorithms: - EdDSA keyset: '%env(SIGNATURE_VERIFICATION_KEYSET)%' ``` The problem in my opinion is the default xml Service configuration, that does not specify the right type. If one acitvates encryption this error disappears as than this config is overwritten anyhow. ``` In AccessTokenLoader.php line 38: Lexik\Bundle\JWTAuthenticationBundle\Services\WebToken\AccessTokenLoader::__construct(): Argument #10 ($jweHeaderChecker) must be of type ?array, string given, called in /var/www/html/var/cache/test/Container1K8ziZx/getLexikJwtAuthentication_AccessTokenLoaderService.php on line 29 ``` Commits ------- 696f600 fix: types for di container for access token loader changed to array
- Loading branch information