diff --git a/composer.json b/composer.json index 47b5b41..58c98c5 100644 --- a/composer.json +++ b/composer.json @@ -12,20 +12,17 @@ "autoload": { "files": [ "inc/namespace.php", - "inc/saml/namespace.php", - "inc/wordpress/namespace.php" + "inc/saml/namespace.php" ] }, "require": { "php": ">=7.1", - "humanmade/wp-simple-saml": "~0.4.3", - "humanmade/delegated-oauth": "^1.0.5" + "humanmade/wp-simple-saml": "~0.4.3" }, "extra": { "altis": { "install-overrides": [ - "humanmade/wp-simple-saml", - "humanmade/delegated-oauth" + "humanmade/wp-simple-saml" ] } } diff --git a/docs/README.md b/docs/README.md index 5d36180..21ce172 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,7 +11,6 @@ Once the CMS has a user record in the database, the user's session is authorized Supported authorization providers are: * [SAML 2.0](./saml-2-0.md) -* [WordPress](./wordpress.md) ## Hiding native login diff --git a/docs/wordpress.md b/docs/wordpress.md deleted file mode 100644 index 630ffe4..0000000 --- a/docs/wordpress.md +++ /dev/null @@ -1,26 +0,0 @@ -# WordPress - -The SSO module allows using a WordPress site as the authentication provider for the Altis site. This works via OAuth 2.0, as such the WordPress site you want to use as the authentication provider must be using the [OAuth 2.0 WordPress Plugin](https://github.com/WP-API/OAuth2). - -To enabled WordPress SSO, you must create an OAuth 2 application on the WordPress site, and set the Callback URL on the OAuth client to `$site_url/hm-delegated-auth-callback`, for example `https://my-site.altis.dev/hm-delegated-auth-callback`. Once you have published and approved the OAuth application on your WordPress site, take note of the Public Key for the client. - -Provide the REST BASE of your WordPress site (usually `https://examples.com/wp-json/`), along with the OAuth client id (public key) obtained in the previous step. This is done via the `sso.wordpress` setting option: - -```json -{ - "extra": { - "altis": { - "modules": { - "sso": { - "wordpress": { - "server-rest-base": "https://examples.com/wp-json/", - "oauth2-client-id": "XXXXXXXXXXX" - } - } - } - } - } -} -``` - -You can optionally configure the WordPress SSO provider to synchronize user roles from the WordPress site. When the `wordpress.sync-roles` setting is set to `true`, the user's role on the WordPress site will be used when creating the user on the Altis site. diff --git a/inc/namespace.php b/inc/namespace.php index da954c8..c6aac8f 100644 --- a/inc/namespace.php +++ b/inc/namespace.php @@ -21,9 +21,6 @@ function bootstrap() { if ( $config['saml'] ) { SAML\bootstrap(); } - if ( $config['wordpress'] ) { - WordPress\bootstrap(); - } add_action( 'login_form', __NAMESPACE__ . '\\output_sso_buttons' ); } @@ -35,7 +32,7 @@ function bootstrap() { */ function is_sso_active() : bool { $config = Altis\get_config()['modules']['sso']; - if ( $config['saml'] || $config['wordpress'] ) { + if ( $config['saml'] ) { return true; } return false; @@ -67,10 +64,6 @@ function output_sso_buttons() : void { - - - -