original_string: protected function _secureRequired(Controller $controller)
      {
          if (is_array($this->_config['requireSecure']) &&
              !empty($this->_config['requireSecure'])
          ) {
              $requireSecure = $this->_config['requireSecure'];
  
              if (in_array($this->_action, $requireSecure) || $requireSecure === ['*']) {
                  if (!$this->getController()->getRequest()->is('ssl')) {
                      throw new SecurityException(
                          'Request is not SSL and the action is required to be secure'
                      );
                  }
              }
          }
  
          return true;
      }
code: protected function _secureRequired(Controller $controller)
      {
          if (is_array($this->_config['requireSecure']) &&
              !empty($this->_config['requireSecure'])
          ) {
              $requireSecure = $this->_config['requireSecure'];
  
              if (in_array($this->_action, $requireSecure) || $requireSecure === ['*']) {
                  if (!$this->getController()->getRequest()->is('ssl')) {
                      throw new SecurityException(
                          'Request is not SSL and the action is required to be secure'
                      );
                  }
              }
          }
  
          return true;
      }
code_tokens: protected function _secureRequired ( Controller $ controller ) { if ( is_array ( $ this -> _config [ 'requireSecure' ] ) && ! empty ( $ this -> _config [ 'requireSecure' ] ) ) { $ requireSecure = $ this -> _config [ 'requireSecure' ] ; if ( in_array ( $ this -> _action , $ requireSecure ) || $ requireSecure === [ '*' ] ) { if ( ! $ this -> getController ( ) -> getRequest ( ) -> is ( 'ssl' ) ) { throw new SecurityException ( 'Request is not SSL and the action is required to be secure' ) ; } } } return true ; }
docstring: Check if access requires secure connection
  
  @param \Cake\Controller\Controller $controller Instantiating controller
  @return bool true if secure connection required
docstring_tokens: Check if access requires secure connection