softwaremill / akka-http-session

Web & mobile client-side akka-http sessions, with optional JWT support
https://softwaremill.com/open-source/
Apache License 2.0
440 stars 58 forks source link

Fix encoding (Base64 URL) for RSA-based signatures #69

Closed mkubala closed 5 years ago

mkubala commented 5 years ago

This PR fixes an issue with RS256 JSON Web Signatures being encoded using BASE64 encoder instead of BASE64URL one. In order to prevent from similar mistakes in future, I extracted a protected encode method into JwsAlgorithm trait.