Skip to content

Support non-RFC compliant base64url padding

Compare
Choose a tag to compare
@MicahParks MicahParks released this 14 Apr 15:21
a5a5835

Trailing padding is required to be removed from base64url encoded keys. This is because RFC 7517 defines base64url the same as RFC 7515 Section 2:

with all trailing '=' characters omitted

However, not all JWKS are perfectly RFC compliant and some include trailing = characters for their base64url encoding. These non-RFC compliant JWKS implementations will be supported since it's trivial to support the removal of trailing = client side and will not impact performance in any noticeable way.