/** * Get url where adapter should return on when doing cancel. * * @return string */ public function getCancelUrl() { $root_url = OAuth2::getBaseUrl(); // ensure https connect urls if ($this->https) { $root_url = str_replace('http:', 'https:', $root_url); } $params = array('oa2_action' => 'cancel', 'oa2_adapter' => $this->adapter_id, 'oa2_state' => $this->state); return OAuth2_CURL::urljoin($root_url, $params); }
/** * URL to which user should be redirected to for login * @return string */ public function getLoginUrl() { $url = OAuth2_CURL::urljoin($this->authorization_uri, array('client_id' => $this->clientId, 'response_type' => 'code', 'redirect_uri' => $this->getConnectUrl())); return $url; }