Example #1
0
 /**
  * Redirects browser to vendor auth uri
  */
 public function getCodeFromVendor()
 {
     $uri = $this->options->vendorOptions->authEntryUri;
     $params = '';
     foreach ($this->options->stage1->toArray() as $key => $param) {
         if (empty($param)) {
             $param = $this->getDefaultParam($key);
         }
         $params[$key] = $param;
     }
     $this->session->state = $params[$this->options->stage1->state->accessKey];
     $uri .= '?' . http_build_query($params);
     $this->response->headers()->addHeaderLine('Location', $uri);
     $this->response->setStatusCode(302);
 }
Example #2
0
 public function has_stopped()
 {
     return intval($this->response->status()) != 200 || $this->response->headers('Location') != null;
 }