From 75eafbaf5656b9f9cbaed25647c75b56d8ac34ac Mon Sep 17 00:00:00 2001 From: Jay Varner Date: Tue, 15 Jun 2021 18:20:18 -0400 Subject: [PATCH] Update Readme. Remove cookie on delete --- README.md | 54 ++++++++++++++++--- .../ecds_rails_auth_engine/current_user.rb | 19 ++++--- .../tokens_controller.rb | 25 +++++++-- 3 files changed, 78 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index d7e8820..1ce2989 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,66 @@ # EcdsRailsAuthEngine -Short description and motivation. -## Usage -How to use my plugin. +Rails engine for using token/signed cookie and FauxOAuth. + ## Installation + Add this line to your application's Gemfile: ```ruby -gem 'ecds_rails_auth_engine' +gem 'ecds_rails_auth_engine', git: 'https://github.com/ecds/ecds_rails_auth_engine.git', branch: 'feature/fauxoauth' ``` And then execute: + ```bash -$ bundle +bundle install ``` -Or install it yourself as: -```bash -$ gem install ecds_rails_auth_engine +## Configuration + +Edit your `config/application.rb` by adding + +```ruby +config.middleware.use(ActionDispatch::Cookies) +config.middleware.use(ActionDispatch::Session::CookieStore) +``` + +Create an initializer at `config/initializers/cookie_session.rb` and add the lines: + +```ruby +Rails.application.config.session_store(:cookie_store, key: '