Page 1 of 1

JSON API authentication

Posted: 25 May 2018, 11:31
by CWirth
Dear Aimeos-team,

I am using the Aimeos-Laravel package(2017.10 with Laravel 5.5) on Ubuntu 18.04 with PHP 7.2.5.
I started using Aimeos recently.
I am trying to access Aimeos through the JSON REST API but I have problems understanding how the authentication works.
An example:
A used the command "curl -X OPTIONS http://192.168.178.53:8000/jsonadm" to receive the service description as described in the documentation, but I only got a page not found response.
My guess is that I must send a token or anything similar with my request, but I can not figure out how to do this.

Thanks in advance
Christian

Re: JSON API authentication

Posted: 25 May 2018, 11:44
by aimeos
Maybe you can use Laravel passport to authenticate first before you can use the admin JSON API:
https://laravel.com/docs/5.5/passport

Re: JSON API authentication

Posted: 26 May 2018, 15:11
by CWirth
Thank you for your answer.
I managed to configure Laravel Passport and generated an access token.
I also configured an Base-URL, but if I sent an OPTIONS request the response only contains an empty body.
Do you have an idea what I did wrong?

Thanks in advance
Christian

Re: JSON API authentication

Posted: 25 Jul 2019, 23:44
by AlbertoAguilera
I'm also struggling to setup the jsonadm with laravel passport, cause i want to override the admin frontend and build one with react and ise password grant tokens to my users, y added the API middleware to the jsonadm route but it keeps popping the login dialog, can you give us a guideline to extend the guard methods of the jsonadm to work with api middleware. Thanks in advance

Re: JSON API authentication

Posted: 18 Oct 2020, 15:53
by Devanshu
I am also having the same problem. I want to get customer Detail.