Added proper OAuth authentication for digikey and other providers

This commit is contained in:
Jan Böhmer 2023-07-16 03:07:53 +02:00
parent a95ba1acc4
commit c203de082e
13 changed files with 876 additions and 19 deletions

View file

@ -2,16 +2,4 @@ framework:
http_client:
default_options:
headers:
'User-Agent': 'Part-DB'
scoped_clients:
digikey.client:
base_uri: 'https://sandbox-api.digikey.com'
auth_bearer: '%env(PROVIDER_DIGIKEY_TOKEN)%'
headers:
X-DIGIKEY-Client-Id: '%env(PROVIDER_DIGIKEY_CLIENT_ID)%'
X-DIGIKEY-Locale-Site: 'DE'
X-DIGIKEY-Locale-Language: 'de'
X-DIGIKEY-Locale-Currency: '%partdb.default_currency%'
X-DIGIKEY-Customer-Id: 0
'User-Agent': 'Part-DB'