laminas-api-tools / api-tools-admin

Laminas API Tools Admin module
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
13 stars 21 forks source link

Error fetching authentication types #18

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

I started a new ZF2 project (following the steps described at Zend Skeleton Application page). After that, I added Apigility to this project (following the steps described at Apigility Documentation). Everything worked fine.

So I opened the admin interface, created an authentication adapter and a new API. The problem is that when I select this API to edit it, an error message is shown (Error fetching authentication types).

I inspected the ajax request (to /apigility/api/auth-type), and I realized that the response is the following JSON: {"status":406,"title":"Not Acceptable","describedBy":"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec10.html","detail":"Your request could not be resolved to an acceptable representation."}

The request had the following parameters:

Content-Type: application/problem+json
Accept: application/vnd.apigility.v2+json

Does anyone know what I'm doing wrong?


Originally posted by @diogodomanski at https://github.com/zfcampus/zf-apigility-admin/issues/342

weierophinney commented 4 years ago

Have you read the RFC?


Originally posted by @colinkelly at https://github.com/zfcampus/zf-apigility-admin/issues/342#issuecomment-259378684

weierophinney commented 4 years ago

I have just picked up a Zf2 project that is using Apigility, without any auth security, so I need to fix that quickly.

I decide to use OAuth2. When I open the the Authentication page I get an error "Error fetching authentication adapters", I suspect this simply means that there are essential modules missing? I would be very grateful for any clues or thoughts. Stay well


Originally posted by @barry1955 at https://github.com/zfcampus/zf-apigility-admin/issues/342#issuecomment-328394791