esbenp / lumen-api-oauth

The code for a blog post I wrote about creating web apps using a Lumen API that is authenticated by OAuth2
http://esbenp.github.io/2015/05/26/lumen-web-api-oauth-2-authentication/
61 stars 22 forks source link

404 not found #16

Closed prashantidealittechno closed 8 years ago

prashantidealittechno commented 8 years ago

can you please check my response printed in proxy.php, may be it could help to find out error about - First parameter must either be an object or the name of an existing class

GuzzleHttp\Psr7\Response Object ( [reasonPhrase:GuzzleHttp\Psr7\Response:private] => Not Found [statusCode:GuzzleHttp\Psr7\Response:private] => 404 [headers:GuzzleHttp\Psr7\Response:private] => Array ( [date] => Array ( [0] => Wed, 30 Sep 2015 05:37:29 GMT )

        [server] => Array
            (
                [0] => Apache/2.4.7 (Ubuntu)
            )

        [content-length] => Array
            (
                [0] => 295
            )

        [content-type] => Array
            (
                [0] => text/html; charset=iso-8859-1
            )

    )

[headerLines:GuzzleHttp\Psr7\Response:private] => Array
    (
        [Date] => Array
            (
                [0] => Wed, 30 Sep 2015 05:37:29 GMT
            )

        [Server] => Array
            (
                [0] => Apache/2.4.7 (Ubuntu)
            )

        [Content-Length] => Array
            (
                [0] => 295
            )

        [Content-Type] => Array
            (
                [0] => text/html; charset=iso-8859-1
            )

    )

[protocol:GuzzleHttp\Psr7\Response:private] => 1.1
[stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object
    (
        [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #28
        [size:GuzzleHttp\Psr7\Stream:private] => 
        [seekable:GuzzleHttp\Psr7\Stream:private] => 1
        [readable:GuzzleHttp\Psr7\Stream:private] => 1
        [writable:GuzzleHttp\Psr7\Stream:private] => 1
        [uri:GuzzleHttp\Psr7\Stream:private] => php://temp
        [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array
            (
            )

    )

)

prashantidealittechno commented 8 years ago

Okay I have resolved the above error by adding port number to my url in config/app.php , e.g. http://192.0.0.0:8000 then in .env file I changed SESSION_DRIVER=cookie but now when I click on login button and checked in console, it is just loading, nothing happens. and when I hit http://192.0.0.0:8000/oauth/access-token with username, password, client_id, client_secret and grant_type through postman then it is giving response as - Array ( [access_token] => 6TxUnhoXF659fku3t6D2CRM3XewOmXup6xbAUBBz [token_type] => Bearer [expires_in] => 10 [refresh_token] => BLQqBTaTn8s6jq9yjepRGFWOGvP882LqzMEYf4Sa )

can you please help?