bshaffer / oauth2-demo-php

A demo application for running an OAuth2 server
748 stars 278 forks source link

Error Retrieving Access Token #54

Open assada opened 9 years ago

assada commented 9 years ago

On exchanging the Authorization Code for an Access Token

object(Guzzle\Http\Message\Response)#173 (10) {
  ["body":protected]=>
  object(Guzzle\Http\EntityBody)#172 (6) {
    ["contentEncoding":protected]=>
    bool(false)
    ["rewindFunction":protected]=>
    NULL
    ["stream":protected]=>
    resource(186) of type (stream)
    ["size":protected]=>
    NULL
    ["cache":protected]=>
    array(9) {
      ["wrapper_type"]=>
      string(3) "PHP"
      ["stream_type"]=>
      string(4) "TEMP"
      ["mode"]=>
      string(3) "w+b"
      ["unread_bytes"]=>
      int(0)
      ["seekable"]=>
      bool(true)
      ["uri"]=>
      string(10) "php://temp"
      ["is_local"]=>
      bool(true)
      ["is_readable"]=>
      bool(true)
      ["is_writable"]=>
      bool(true)
    }
    ["customData":protected]=>
    array(1) {
      ["default"]=>
      bool(true)
    }
  }
  ["reasonPhrase":protected]=>
  string(2) "OK"
  ["statusCode":protected]=>
  int(200)
  ["info":protected]=>
  array(26) {
    ["url"]=>
    string(34) "http://id.server.isd/lockdin/token"
    ["content_type"]=>
    string(16) "application/json"
    ["http_code"]=>
    int(200)
    ["header_size"]=>
    int(288)
    ["request_size"]=>
    int(371)
    ["filetime"]=>
    int(-1)
    ["ssl_verify_result"]=>
    int(0)
    ["redirect_count"]=>
    int(0)
    ["total_time"]=>
    float(0.421)
    ["namelookup_time"]=>
    float(0)
    ["connect_time"]=>
    float(0)
    ["pretransfer_time"]=>
    float(0)
    ["size_upload"]=>
    float(184)
    ["size_download"]=>
    float(1781)
    ["speed_download"]=>
    float(4230)
    ["speed_upload"]=>
    float(437)
    ["download_content_length"]=>
    float(1781)
    ["upload_content_length"]=>
    float(184)
    ["starttransfer_time"]=>
    float(0.406)
    ["redirect_time"]=>
    float(0)
    ["certinfo"]=>
    array(0) {
    }
    ["primary_ip"]=>
    string(12) "192.168.0.24"
    ["primary_port"]=>
    int(80)
    ["local_ip"]=>
    string(12) "192.168.0.24"
    ["local_port"]=>
    int(54292)
    ["redirect_url"]=>
    string(0) ""
  }
  ["effectiveUrl":protected]=>
  string(34) "http://id.server.isd/lockdin/token"
  ["headers":protected]=>
  object(Guzzle\Http\Message\Header\HeaderCollection)#176 (1) {
    ["headers":protected]=>
    array(8) {
      ["date"]=>
      object(Guzzle\Http\Message\Header)#177 (3) {
        ["values":protected]=>
        array(1) {
          [0]=>
          string(29) "Wed, 08 Jul 2015 14:17:01 GMT"
        }
        ["header":protected]=>
        string(4) "Date"
        ["glue":protected]=>
        string(1) ","
      }
      ["server"]=>
      object(Guzzle\Http\Message\Header)#178 (3) {
        ["values":protected]=>
        array(1) {
          [0]=>
          string(32) "Apache/2.2.14 (Win32) PHP/5.4.42"
        }
        ["header":protected]=>
        string(6) "Server"
        ["glue":protected]=>
        string(1) ","
      }
      ["x-powered-by"]=>
      object(Guzzle\Http\Message\Header)#179 (3) {
        ["values":protected]=>
        array(1) {
          [0]=>
          string(10) "PHP/5.4.42"
        }
        ["header":protected]=>
        string(12) "X-Powered-By"
        ["glue":protected]=>
        string(1) ","
      }
      ["set-cookie"]=>
      object(Guzzle\Http\Message\Header)#180 (3) {
        ["values":protected]=>
        array(1) {
          [0]=>
          string(44) "PHPSESSID=hfoj23cirkdsjtqif8s3u82ro5; path=/"
        }
        ["header":protected]=>
        string(10) "Set-Cookie"
        ["glue":protected]=>
        string(1) ","
      }
      ["cache-control"]=>
      object(Guzzle\Http\Message\Header\CacheControl)#181 (4) {
        ["directives":protected]=>
        NULL
        ["values":protected]=>
        array(1) {
          [0]=>
          string(17) "no-store, private"
        }
        ["header":protected]=>
        string(13) "Cache-Control"
        ["glue":protected]=>
        string(1) ","
      }
      ["pragma"]=>
      object(Guzzle\Http\Message\Header)#182 (3) {
        ["values":protected]=>
        array(1) {
          [0]=>
          string(8) "no-cache"
        }
        ["header":protected]=>
        string(6) "Pragma"
        ["glue":protected]=>
        string(1) ","
      }
      ["content-length"]=>
      object(Guzzle\Http\Message\Header)#183 (3) {
        ["values":protected]=>
        array(1) {
          [0]=>
          string(4) "1781"
        }
        ["header":protected]=>
        string(14) "Content-Length"
        ["glue":protected]=>
        string(1) ","
      }
      ["content-type"]=>
      object(Guzzle\Http\Message\Header)#184 (3) {
        ["values":protected]=>
        array(1) {
          [0]=>
          string(16) "application/json"
        }
        ["header":protected]=>
        string(12) "Content-Type"
        ["glue":protected]=>
        string(1) ","
      }
    }
  }
  ["headerFactory":protected]=>
  object(Guzzle\Http\Message\Header\HeaderFactory)#175 (1) {
    ["mapping":protected]=>
    array(2) {
      ["cache-control"]=>
      string(39) "Guzzle\Http\Message\Header\CacheControl"
      ["link"]=>
      string(31) "Guzzle\Http\Message\Header\Link"
    }
  }
  ["params":protected]=>
  object(Guzzle\Common\Collection)#174 (1) {
    ["data":protected]=>
    array(0) {
    }
  }
  ["protocol":protected]=>
  string(4) "HTTP"
  ["protocolVersion":protected]=>
  string(3) "1.1"
}
hypnotisttom commented 9 years ago

Getting the same thing...