How I can use an document json with have link protected? #10629
-
I would like to know if I can use a protected link to the json document? For example, a json file that is in gitlab. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I'd be happy to assist you. Could you please provide some additional details to help us better understand your requirements?
With these details, we can provide a more accurate solution for your use case. |
Beta Was this translation helpful? Give feedback.
-
The Custom Endpoint badge might be an alternative option to the dynamic json badge; your custom endpoint can contain the relevant auth, make the call to gitlab with the auth, and then the custom endpoint can be accessed anonymously by shields.io/self-hosted shields server |
Beta Was this translation helpful? Give feedback.
The dynamic badges just call a URL.
This is the same for both shields.io and self-hosted instances.
This means that if you can pass the auth as part of the URL e.g:
You could request a document that requires auth. Although that does require exposing the credentials to anyone who can see your README in plain text (and also to us, if you use shields.io) so you might not want to do that for obvious reasons.
There's no mechanism to pass auth in other ways (e.g: in a header) for the dynamic badges, even if you host your own instance.