Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwritten encryptionKeyPath #32

Open
areissherud opened this issue Oct 20, 2020 · 0 comments
Open

Overwritten encryptionKeyPath #32

areissherud opened this issue Oct 20, 2020 · 0 comments

Comments

@areissherud
Copy link

Hello,
I'm using this bundle (v2.1.0) combined with league/oauth2-client (v.2.2.1) and knpuniversity/oauth2-client-bundle (v2.3.0). I have the problem that the config parameter encryptionKeyPath is always overwritten and can not be used for that reason.

As far as I understand this happens:

In the Stevenmaguire\OAuth2\Client\Provider\Keycloak the constructor reads the encryption key file content and puts it in the encryptionKey property. After that the parent constructor League\OAuth2\Client\Provider\AbstractProvider is called. For each option the property will be set with the corresponding value. Thats also the case for the encryptionKey option. So the previous value from encryptionKeyPath will always be overwritten by the encryptionKey value.

Now comes the problem with the knpuniversity/oauth2-client-bundle. In KnpU\OAuth2ClientBundle\DependencyInjection\Providers\KeycloakProviderConfigurator encryption_key is set with default null. So even if you do not have it in your configuration, it is passed as option with value null to the Provider constructors. You end up with encryptionKey null without the content from your encryptionKeyPath in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant