About this plugin
With this plugin you can use your own WordPress install to authenticate with a webservice that provides OpenID Connect to implement Single-Sign On (SSO) for your users.
The plugin is currently only configured using constants and hooks as follows:
Define the RSA keys
If you don’t have keys that you want to use yet, generate them using these commands:
key
And make them available to the plugin as follows (this needs to be added before WordPress loads):
define( 'OIDC_PUBLIC_KEY', <<<OIDC_PUBLIC_KEY -----BEGIN PUBLIC KEY----- ...
-----END PUBLIC KEY----- OIDC_PUBLIC_KEY );
define( 'OIDC_PRIVATE_KEY', <<<OIDC_PRIVATE_KEY -----BEGIN PRIVATE KEY----- ...
-----END PRIVATE KEY----- OIDC_PRIVATE_KEY );
Alternatively, you can also put them outside the webroot and load them from the files like this:
key' ) );
Define the clients
php of your theme or in a MU-plugin like:
uri', 'grant_types' => array( 'authorization_code' ), 'scope' => 'openid profile', ), ); }
Exclude URL from caching
- example.com/wp-json/openid-connect/userinfo: We implement caching exclusion measures for this endpoint by setting Cache-Control: 'no-cache' headers and defining the DONOTCACHEPAGE constant. If you have a unique caching configuration, please ensure that you manually exclude this URL from caching.
Github Repo
You can report any issues you encounter directly on Github repo: Automattic/wp-openid-connect-server