Replies: 1 comment
-
That authentication looks like a classic OAuth flow. The Octopart provider uses something similar. Digikey (there you even have the more complex flow, where the user has to login at the digikey homepage to get the token). The token storage logic is already there and most of the oauth authentication flow, so that the provider can focus mostly on using the bearer token, not so much retrieving it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bürklin also offers an API. (Apply here: https://www.buerklin.com/de/services/eprocurement/)
I have already started to implement an Information Provider (https://github.com/mkne/Part-DB-server/tree/Buerklin-provider) but I have hardly any PHP experience.
Authorization works via Bearer Token that is requested via a POST-action to https://www.buerklin.com/authorizationserver/oauth/token/ and the following parameters:
client_id:cws-client
client_secret:{{PROVIDER_BUERKLIN_SECRET}}
grant_type:password
username:{{PROVIDER_BUERKLIN_USERNAME}}
password:{{PROVIDER_BUERKLIN_PASSWORD}}
There are only two GET-actions available:
I would set the parameters curr and language via PROVIDER_BUERKLIN_CURRENCY and PROVIDER_BUERKLIN_LANGUAGE.
I tried to implement it based on the LCSC Info Provider but realized that this was not the right choice as it doesn't use Authentication.
I also have difficulties to map the JSON-Results of the get requests to the appropriate DTOs.
Which information provider would be the best one to use as a template for this kind of API? Is someone willing to help with the implementation? I haven't found any description of the JSON response schema and also the API description is very limited, There's not much more information in it as explained above. However Bürklin supplies a postman collection which can be used to test the API.
Beta Was this translation helpful? Give feedback.
All reactions