monsantoco / glass-key

This is a common library which supports Play and Spray communicating as clients and resources for OAuth2.

Version Matrix

glass-key

This project serves as a library to support OAuth call wrapping for Scala (initially Spray/Play)

  • Supports Authorization Code, Client Credentials, and Resource Owner grant types (you should do implicit via a browser client, although the resource code in this library will handle the token)
  • Validates a OAuth token against ping (configurable Validators via Dependency Injection)
  • Supports OAuth access token present in client http header or query parameter
  • Supports Open ID token validation/usage if header/param named correctly
  • Client will retry 3 times to get a token
  • Transforms errors to JSON

For Spray - see Glass Key Spray Client and Glass Key Spray Resource

For Play - see Glass Key Play Client and Glass Key Play Resource

The Glass Key

Inspiration for the naming of glass-key comes from Star Wars lore. The Glass Key was used to activate and control the Ardana Shadex, a huge stone giant capable of mass destruction. The project could have been named Ardana Shadex, but that just seemed like too long of a name/too many syllables.

The Glass Key