options_storage = $options_storage; $this->oauth_storage = $oauth_storage; } /** * @return bool */ public function is_plugin_enabled() { return $this->options_storage->is_plugin_enabled(); } /** * @return bool */ public function client_completed_registration() { try { $this->oauth_storage->retrieveToken( TokenType::WORDPRESS ); return $this->options_storage->get_twofas_email() && $this->options_storage->get_twofas_integration_login() && $this->options_storage->get_twofas_key_token() && $this->options_storage->get_twofas_encryption_key(); } catch ( TokenNotFoundException $e ) { return false; } } }