{"repo":"blackdoor/jose","free":true,"listed":false,"github":"https://github.com/blackdoor/jose","clone":"git clone https://github.com/blackdoor/jose.git","description":"Extensible JOSE library for Scala","language":"Scala","stars":16,"topics":["jose","jwt","scala","signing","jwt-validation"],"license":"Unlicense","category":"auth-billing-email","readme_excerpt":"If you're reading this, click HERE jose Extensible JOSE library for Scala. Installation The dependency is available on Maven Central. Usage Pretty simple: make a key, make something to sign, sign it. Selecting a JSON implementation Currently supported JSON libraries: [x] ninny JSON [x] Play JSON [ ] Json4s [x] Circe To add a JSON support, just import or mix in an implementation like import black.door.jose.json.playjson.JsonSupport. . If your preferred library isn't supported, just implement Mapper implicits (or open an issue to request they be added). Async key resolution and validation checks Frequently you will need to dynamically look up a new key from a keyserver based on a JWS header, or check a centralized cache to see if a token has been revoked. This is easy to do asynchronously by implementing KeyResolver or JwtValidator. JwtValidator is a partial function so you can easily chain both sync and async validations. KeyResolver allows you to return an error in the event that there was a specific reason a key could not be found (perhaps a key does exist, but it's only for encryption and this token is using it for signing). JWT validation DSL There is a handy compile-safe DSL for JWT validation that allows you to indicate if you want to use unregistered claims, and if you want to evaluate synchronously or asynchronously. Its structure looks like this So for example you could synchronously validate a JWT with some custom claims with --- Not yet implemented: JWK serializatio","default_branch":null,"files":null,"tree":[],"storefront":"/r/blackdoor","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/blackdoor/jose/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}