/** * opauth * @param boolean $autoRun Should Opauth auto run? Default: false * @return Opauth The Opauth instance. Isn't it easy to typo this as Opeth? */ public static function opauth($autoRun = false, $config = array()) { if (!isset(self::$opauth)) { self::$opauth = new Opauth(self::get_opauth_config($config), $autoRun); } return self::$opauth; }
/** * Returns the response from the Oauth callback. * @throws InvalidArugmentException * @return array The response */ protected function getOpauthResponse() { $config = OpauthAuthenticator::get_opauth_config(); $transportMethod = $config['callback_transport']; switch ($transportMethod) { case 'session': return $this->getResponseFromSession(); break; case 'get': case 'post': return $this->getResponseFromRequest($transportMethod); break; default: throw new InvalidArgumentException('Invalid transport method: ' . $transportMethod); break; } }
/** * The authenticator name, used in templates * @return string */ public function getAuthenticatorName() { return OpauthAuthenticator::get_name(); }