You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Authenticate using the Authorization header in requests made by the cient #59
I published the GROBID server application in an Azure Web App. I added an authorisation layer using the one provided by Azure Web Apps. Now I need to authenticate the GROBID client by passing the bearer authentication token to its header requests. How can I do this?
This client is a simple base to be adapted on the environment requirements and there is for the moment no mechanisms to pass a bearer, you need to add it.
One simple solution is to add the bearer token defined in the config file or as environment variable secret in the header argument when calling the post() method:
Activity
kermitt2 commentedon Apr 20, 2023
Hi @lucazav !
This client is a simple base to be adapted on the environment requirements and there is for the moment no mechanisms to pass a bearer, you need to add it.
One simple solution is to add the bearer token defined in the config file or as environment variable secret in the header argument when calling the post() method:
https://github.com/kermitt2/grobid_client_python/blob/master/grobid_client/grobid_client.py#L278
A PR to add this is very welcome !