JSON API authentication

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
CWirth
Posts: 2
Joined: 25 May 2018, 09:57

JSON API authentication

Post by CWirth » 25 May 2018, 11:31

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

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: JSON API authentication

Post by aimeos » 25 May 2018, 11:44

Maybe you can use Laravel passport to authenticate first before you can use the admin JSON API:
https://laravel.com/docs/5.5/passport
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

CWirth
Posts: 2
Joined: 25 May 2018, 09:57

Re: JSON API authentication

Post by CWirth » 26 May 2018, 15:11

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

User avatar
AlbertoAguilera
Posts: 3
Joined: 25 Jul 2019, 23:40

Re: JSON API authentication

Post by AlbertoAguilera » 25 Jul 2019, 23:44

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

Devanshu
Posts: 2
Joined: 18 Oct 2020, 13:15

Re: JSON API authentication

Post by Devanshu » 18 Oct 2020, 15:53

I am also having the same problem. I want to get customer Detail.

Post Reply