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
Add a useragent header when fetching data + print response if not JSON (#59)
This commit introduces two fixes/QoL changes. First off, it adds a
useragent to every request sent by this tool. This is required iff
the remote server rejects requests without any specific useragent
being set (an example for this is Wikimedia Toolforge, which will
drop all HTTP requests without a User-Agent header
See: https://wikitech.wikimedia.org/wiki/Help:Toolforge/Banned#Banned_user_agents_and_IP_addresses
Additionally the second change introduced prints the body of the
response into stderr iff the tool encounters a error in parsing the
JSON data into JWKS sets. This is particularly useful because it
(~~allowed me to debug the error above~~) will help folks figure out
exactly what data got sent back from the server and why the tool might
not be able to validate the keys.
0 commit comments