Keycard provides authentication support and user/request information, especially in Rails applications.
Keycard is designed to give you sound guidelines and integration between authentication and authorization without constraining your application. It takes inspiration from Sorcery, but has four important distinctions:
- It does not use mixins to configure a "model that can log in".
- It provides a way to retrieve user and session attributes like directory information or IP address-based region, rather than being strictly about logging in and out.
- It only provides one built-in strategy for logins, focused on single sign-on scenarios.
- It offers an optional group implementation for whatever objects your application manages as accounts or users.
The ultimate goal is to provide useful tools that integrate easily and simplify building applications that have clean, well-factored designs. Keycard should help you focus on solving your application problems, while remaining invisible -- not magical -- to most of your application.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install keycard
Keycard is licensed under the BSD-3-Clause license. See LICENSE.md.