processAuthDone() protected method

Define: endpoint step 3.1 and 3.2
protected processAuthDone ( ) : void
return void
Beispiel #1
1
 /**
  * Process the current request
  *
  * $request - The current request parameters. Leave as NULL to default to use $_REQUEST.
  */
 public static function process($request = NULL)
 {
     // Setup request variable
     Hybrid_Endpoint::$request = $request;
     if (is_null(Hybrid_Endpoint::$request)) {
         Hybrid_Endpoint::$request = $_REQUEST;
     }
     // If windows_live_channel requested, we return our windows_live WRAP_CHANNEL_URL
     if (isset(Hybrid_Endpoint::$request["get"]) && Hybrid_Endpoint::$request["get"] == "windows_live_channel") {
         Hybrid_Endpoint::processWindowsLiveChannel();
     }
     // If openid_policy requested, we return our policy document
     if (isset(Hybrid_Endpoint::$request["get"]) && Hybrid_Endpoint::$request["get"] == "openid_policy") {
         Hybrid_Endpoint::processOpenidPolicy();
     }
     // If openid_xrds requested, we return our XRDS document
     if (isset(Hybrid_Endpoint::$request["get"]) && Hybrid_Endpoint::$request["get"] == "openid_xrds") {
         Hybrid_Endpoint::processOpenidXRDS();
     }
     // If we get a hauth.start
     if (isset(Hybrid_Endpoint::$request["hauth_start"]) && Hybrid_Endpoint::$request["hauth_start"]) {
         Hybrid_Endpoint::processAuthStart();
     } elseif (isset(Hybrid_Endpoint::$request["hauth_done"]) && Hybrid_Endpoint::$request["hauth_done"]) {
         Hybrid_Endpoint::processAuthDone();
     } else {
         Hybrid_Endpoint::processOpenidRealm();
     }
 }
Beispiel #2
0
 /**
  * Process the current request
  *
  * $request - The current request parameters. Leave as NULL to default to use $_REQUEST.
  */
 public static function process($request = NULL)
 {
     // Setup request variable
     Hybrid_Endpoint::$request = $request;
     if (is_null(Hybrid_Endpoint::$request)) {
         // Fix a strange behavior when some provider call back ha endpoint
         // with /index.php?hauth.done={provider}?{args}...
         // >here we need to recreate the $_REQUEST
         if (strrpos($_SERVER["QUERY_STRING"], '?')) {
             $_SERVER["QUERY_STRING"] = str_replace("?", "&", $_SERVER["QUERY_STRING"]);
             parse_str($_SERVER["QUERY_STRING"], $_REQUEST);
         }
         Hybrid_Endpoint::$request = $_REQUEST;
     }
     // If windows_live_channel requested, we return our windows_live WRAP_CHANNEL_URL
     if (isset(Hybrid_Endpoint::$request["get"]) && Hybrid_Endpoint::$request["get"] == "windows_live_channel") {
         Hybrid_Endpoint::processWindowsLiveChannel();
     }
     // If openid_policy requested, we return our policy document
     if (isset(Hybrid_Endpoint::$request["get"]) && Hybrid_Endpoint::$request["get"] == "openid_policy") {
         Hybrid_Endpoint::processOpenidPolicy();
     }
     // If openid_xrds requested, we return our XRDS document
     if (isset(Hybrid_Endpoint::$request["get"]) && Hybrid_Endpoint::$request["get"] == "openid_xrds") {
         Hybrid_Endpoint::processOpenidXRDS();
     }
     // If we get a hauth.start
     if (isset(Hybrid_Endpoint::$request["hauth_start"]) && Hybrid_Endpoint::$request["hauth_start"]) {
         Hybrid_Endpoint::processAuthStart();
     } elseif (isset(Hybrid_Endpoint::$request["hauth_done"]) && Hybrid_Endpoint::$request["hauth_done"]) {
         Hybrid_Endpoint::processAuthDone();
     } else {
         Hybrid_Endpoint::processOpenidRealm();
     }
 }
Beispiel #3
0
 public static function processAuthDone()
 {
     WSL_Hybrid_Endpoint::authInit();
     try {
         parent::processAuthDone();
     } catch (Exception $e) {
         WSL_Hybrid_Endpoint::dieError("410 Gone", $e->getMessage() . "<br />For more information refer to WSL <a href='http://miled.github.io/wordpress-social-login/troubleshooting.html' target='_blank'>Troubleshooting</a>");
     }
 }