mezzio/mezzio-authentication-oauth2

Invalid default configuration

michalbundyra opened this issue · 2 comments

Bug Report

Q A
Version(s) all ?

Summary

Default configuration provided is different than documented:

Configuration:

'private_key' => getcwd() . '/data/private.key',
'public_key' => getcwd() . '/data/public.key',

Documentation:
https://github.com/mezzio/mezzio-authentication-oauth2/blob/master/docs/book/v1/intro.md#configuration

Generating keys:

$dataDir = $dataDir . '/oauth';

Current behavior

In the current configuration we have path set to /data/public.key and /data/private.key while documentation says default path is /data/oauth/public.key and /data/oauth/private.key and also generator put keys in that location.

I believe we have to update the configuration to set whatever is said in the documentation.

It can breaks some applications if someone relies on that "invalid" configuration.

The same for encryption key:

$encryptionKeyFile = getcwd() . '/data/encryption.key';

I would go with the location where the key generator puts the keys, and make sure the documentation is indicating it correctly. Since the docs and key generator are in agreement, I'd consider the configuration to be incorrect here.