-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Thanks all for this plugin. I appreciate the work put into it.
For my use case, it would be useful to be able to configure the lifetimes of the access/ID tokens. This currently uses the default values from oauth2-server-php (3600s) and I don't see a way to change these in OpenID Connect Server (please correct me if I am wrong). Could we add a way to configure this?
Perhaps the fastest way to allow configuration of the OAuth server would be to add a configuration filter here:
wp-openid-connect-server/src/OpenIDConnectServer.php
Lines 33 to 39 in 1532bef
| $config = array( | |
| 'use_jwt_access_tokens' => true, | |
| 'use_openid_connect' => true, | |
| 'issuer' => home_url( '/' ), | |
| ); | |
| $server = new Server( new AuthorizationCodeStorage(), $config ); |
Something like:
$config = apply_filters( 'oidc_server_config', array() );
// Enforce required values
$config['use_openid_connect'] = true;
$config['use_jwt_access_tokens'] = true;
$config['issuer'] = home_url( '/' );
$server = new Server( new AuthorizationCodeStorage(), $config );This allows most of the configuration values to be set whilst ensuring the required values are maintained.
Thanks for taking the time to read this.