privacypass-ts
privacypass-ts copied to clipboard
header_to_token: base64 only once
header_to_token() is a very nice high-level API for turning a WWW-Authenticate header (a Token Request) into an Authorization header (a Token).
Unfortunately, currently it's broken: It encodes the header that fetchToken() returns ready to use (especially already encoded as base64) another time as base64. That is one time too many.