a0_options = $a0_options; $this->connection_profile = new WP_Auth0_InitialSetup_ConnectionProfile( $this->a0_options ); $this->enterprise_connection_step = new WP_Auth0_InitialSetup_EnterpriseConnection( $this->a0_options ); $this->consent_step = new WP_Auth0_InitialSetup_Consent( $this->a0_options ); $this->adminuser_step = new WP_Auth0_InitialSetup_AdminUser( $this->a0_options ); $this->connections_step = new WP_Auth0_InitialSetup_Connections( $this->a0_options ); $this->end_step = new WP_Auth0_InitialSetup_End( $this->a0_options ); } /** * @deprecated - 3.10.0, will move add_action calls out of this class in the next major. * * @codeCoverageIgnore - Deprecated. */ public function init() { add_action( 'init', array( $this, 'init_setup' ), 1 ); add_action( 'admin_action_wpauth0_callback_step1', array( $this->connection_profile, 'callback' ) ); add_action( 'admin_action_wpauth0_callback_step3_social', array( $this->adminuser_step, 'callback' ) ); if ( isset( $_REQUEST['page'] ) && 'wpa0-setup' === $_REQUEST['page'] ) { if ( isset( $_REQUEST['error'] ) ) { add_action( 'admin_notices', array( $this, 'notify_error' ) ); } } if ( isset( $_REQUEST['error'] ) && 'cant_create_client' == $_REQUEST['error'] ) { add_action( 'admin_notices', array( $this, 'cant_create_client_message' ) ); } if ( isset( $_REQUEST['error'] ) && 'cant_create_client_grant' == $_REQUEST['error'] ) { add_action( 'admin_notices', array( $this, 'cant_create_client_grant_message' ) ); } if ( isset( $_REQUEST['error'] ) && 'cant_exchange_token' == $_REQUEST['error'] ) { add_action( 'admin_notices', array( $this, 'cant_exchange_token_message' ) ); } if ( isset( $_REQUEST['error'] ) && 'rejected' == $_REQUEST['error'] ) { add_action( 'admin_notices', array( $this, 'rejected_message' ) ); } if ( isset( $_REQUEST['error'] ) && 'access_denied' == $_REQUEST['error'] ) { add_action( 'admin_notices', array( $this, 'access_denied' ) ); } } /** * * @deprecated 3.6.0 - Not needed, handled in WP_Auth0_Admin::admin_enqueue() */ public function admin_enqueue() { // phpcs:ignore @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } /** * * @deprecated 3.6.0 - Duplicate functionality, replaced by WP_Auth0_Admin::create_account_message() */ public function notify_setup() { // phpcs:ignore @trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); } public function notify_error() { printf( '
%s
', strip_tags( $_REQUEST['error'] ) ); } public function render_setup_page() { $step = ( isset( $_REQUEST['step'] ) ? $_REQUEST['step'] : 1 ); $profile = ( isset( $_REQUEST['profile'] ) ? $_REQUEST['profile'] : null ); if ( is_numeric( $step ) && $step >= 1 && $step <= 6 ) { $last_step = $this->a0_options->get( 'last_step' ); if ( $step > $last_step ) { $this->a0_options->set( 'last_step', $step ); } switch ( $step ) { case 1: $this->connection_profile->render( $step ); break; case 2: if ( $profile == 'social' ) { $this->connections_step->render( $step ); } elseif ( $profile == 'enterprise' ) { $this->enterprise_connection_step->render( $step ); } break; case 3: if ( $profile == 'social' ) { $this->adminuser_step->render( $step ); } elseif ( $profile == 'enterprise' ) { // $this->connections_step->render($step); } break; case 4: $this->end_step->render( $step ); break; } } } public function cant_create_client_message() { ?>

APIs > Auth0 Management API > Machine to Machine Applications tab and authorize this Application. ', 'wp-auth0' ); ?> , ', WP_Auth0_Api_Client::get_required_scopes() ); ?>

https://a0_options->get( 'domain' ); ?>

https://manage.auth0.com

consent_step->callback(); } }