public function testGet()
 {
     $httpClient = new Akita_OpenIDConnect_Util_HttpClient();
     $result = $httpClient->get('http://www.yahoo.co.jp/');
     $this->assertNotEquals(false, $result);
     $result = $httpClient->get('https://www.google.co.jp/');
     $this->assertNotEquals(false, $result);
     $httpClient->setTimeout(20, 20);
     $result = $httpClient->get('https://openidconnect.info/');
     $this->assertNotEquals(false, $result);
 }
Exemplo n.º 2
0
 private function setRequestObject($params, $httpClient = null)
 {
     if (is_null($httpClient)) {
         $httpClient = new Akita_OpenIDConnect_Util_HttpClient();
     }
     // get request string
     if (isset($params['request_uri'])) {
         // from request_file param
         $this->openidConnectRequest = rtrim($httpClient->get($params['request_uri']));
     } elseif (isset($params['request'])) {
         // from request param
         $this->openidConnectRequest = $params['request'];
     }
 }