dusterio / lumen-passport

Making Laravel Passport work with Lumen
MIT License
654 stars 141 forks source link

Unauthorized response #20

Closed mikrahub closed 7 years ago

mikrahub commented 7 years ago

Hi. I create a clear lumen project, then install you package, configure it, but i have some problem.

1) Creating clients (OK) 2) Getting Access token (OK) grant_type:password client_id:1 client_secret:mxsoiKILaCDuNTX5KRkbmmxBWE629eHiXy9qavvV username:<email> password:<password>

Response like

{ "token_type": "Bearer", "expires_in": 31536000, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjdkMjkwNjA4OGQ4NzE5N2IyM2VkNzdjNTFjNmNlNDI5ZWI0MGQxZWQyOTU5M2M1ZjllNmYzZDU2MzUyOGUwMGY4OGNmMWI4MDQ0OTQ4NjBkIn0.eyJhdWQiOiIxIiwianRpIjoiN2QyOTA2MDg4ZDg3MTk3YjIzZWQ3N2M1MWM2Y2U0MjllYjQwZDFlZDI5NTkzYzVmOWU2ZjNkNTYzNTI4ZTAwZjg4Y2YxYjgwNDQ5NDg2MGQiLCJpYXQiOjE0ODQ2ODAwOTUsIm5iZiI6MTQ4NDY4MDA5NSwiZXhwIjoxNTE2MjE2MDk1LCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.rc0Je5en_ppir2roA7XJY6feTrDhEA7RbqXT1q6f4Jhkf2lr5VKpDZrCGHbWUFdhXWXJ91qDes0jVChqoZqR7UcRurwW054mX-hqSYzQiuM9hXaQH-eEfdwyx8qzYEJyB5c9i-CNul7VCru-3vEdsZcMuO3doYAiGW0PHSSvDN7b1qz27BS-6_offE0DZICpNkljJ5cvUqWSravhuScxLrAETQ46Ugb8VVfhGIz9oGeW2KJhfddXV2aTwDPWD8QBTAPN4aYcN4hsW4RXtdY2BbWitHfvKBGwpiu9P1Q-iz3lDVH0jys0ekrwXoaqb2GcBbOZVEbco9_9Ori6GMYacMkG_sOA74ZooqmgkWu1OKSUuY0MToi6UUXN7ngrmNK9hle76uNWgORdGX-2euk2nOIkpk1CiI3ARICLLQOV3a4Zo0-6RTNN1TUE56Zs1gGafTyY7XakN0YK2cKfvGAk-sp00f6G2gzQYuenifJqxLHgOLpWqZTpgBesZ1MZ7q-lJBN5tnImP3Mh-CKHN7hpa4w0FE449fRnKreuqQ8btixUbiwIULeIrWfJgViztHk80rxnMSJkyzwMIf5gzhwkiAjc1dx9uhBqruqIgHbJru5tFuY96tUNSDedV1gkBOlFR6nk55Zog0Y00hQD-cNxJ4QBSuHT1yhM8CGh6y9iR-A", "refresh_token": "R/cjRZGpczj7DEs5MKDu3zSom/wANCjsb+MsbL+jM4E13tQ9fE36ibt1GLnJ3nRR6Yc8RTH0NSk1rptIrMJneZmHIy0XqS0A7RBhYYP/bEqizrPwwBGQaTd1N9hPVSfrXla3wRLapbI+PkGzPPindL8kSF0N/FPOS1oJ3Lwrx5At1vxJheye49jsL/AY7bTBj8KDeS0nD7C0zcQzAAzKiO6pUkFckTA1lrWCzGYs/SWfSNcBSLD/mb/gUrDnL+nJ36bx9pvHs9zG0xeBMy7MoIzVR/cCpUoaFnp1u7rlNBlPKPoH9wtRJInd42/lYrI04HrLvaqkrDf3snEgDrkAFQ5w0yCE62Np7IveimzhbJGE4720PKav2L5D1i7VyjvGONkO26ot0i94HpZOjAyHRy4fZW+mM7+nvqbOg++XooYG5Q1ifh4MckhsuUl2a1yjW3LzhmZtLCRDhk3rDAa2wMDhg4uObZuKTTXPc0yGzJ0SWLwIcxjTkyF814JBzdPd7+Ne3QJIjzxlyvzNUEbujtwnagv9fn5gFyIf6kaZiVyw7XYchCG//dopu3244ByeLE4jGAlTDnHC6p9sXrlgs4PdN0E0fO+cQODMnPhcNsHKp+8X6JhhUsWywkAs77ZYK8vp1q5yg2WLOlfytgKuaQgs69vzu7xcoRx9mopJe78=" }

3) Authorize request /oauth/tokens or any route which covered by 'auth' middleware (Unauthorized.)

Authorization:Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjdkMjkwNjA4OGQ4NzE5N2IyM2VkNzdjNTFjNmNlNDI5ZWI0MGQxZWQyOTU5M2M1ZjllNmYzZDU2MzUyOGUwMGY4OGNmMWI4MDQ0OTQ4NjBkIn0.eyJhdWQiOiIxIiwianRpIjoiN2QyOTA2MDg4ZDg3MTk3YjIzZWQ3N2M1MWM2Y2U0MjllYjQwZDFlZDI5NTkzYzVmOWU2ZjNkNTYzNTI4ZTAwZjg4Y2YxYjgwNDQ5NDg2MGQiLCJpYXQiOjE0ODQ2ODAwOTUsIm5iZiI6MTQ4NDY4MDA5NSwiZXhwIjoxNTE2MjE2MDk1LCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.rc0Je5en_ppir2roA7XJY6feTrDhEA7RbqXT1q6f4Jhkf2lr5VKpDZrCGHbWUFdhXWXJ91qDes0jVChqoZqR7UcRurwW054mX-hqSYzQiuM9hXaQH-eEfdwyx8qzYEJyB5c9i-CNul7VCru-3vEdsZcMuO3doYAiGW0PHSSvDN7b1qz27BS-6_offE0DZICpNkljJ5cvUqWSravhuScxLrAETQ46Ugb8VVfhGIz9oGeW2KJhfddXV2aTwDPWD8QBTAPN4aYcN4hsW4RXtdY2BbWitHfvKBGwpiu9P1Q-iz3lDVH0jys0ekrwXoaqb2GcBbOZVEbco9_9Ori6GMYacMkG_sOA74ZooqmgkWu1OKSUuY0MToi6UUXN7ngrmNK9hle76uNWgORdGX-2euk2nOIkpk1CiI3ARICLLQOV3a4Zo0-6RTNN1TUE56Zs1gGafTyY7XakN0YK2cKfvGAk-sp00f6G2gzQYuenifJqxLHgOLpWqZTpgBesZ1MZ7q-lJBN5tnImP3Mh-CKHN7hpa4w0FE449fRnKreuqQ8btixUbiwIULeIrWfJgViztHk80rxnMSJkyzwMIf5gzhwkiAjc1dx9uhBqruqIgHbJru5tFuY96tUNSDedV1gkBOlFR6nk55Zog0Y00hQD-cNxJ4QBSuHT1yhM8CGh6y9iR-A

Looking forward to hearing from you soon!

Best regards, Artem

mikrahub commented 7 years ago

It's ok, that was my fault, i didn't enable mod_rewrite on my server