A gem to hold shared code which other GOV.UK apps will use to implement accounts-related functionality.
A gem to hold shared code which other GOV.UK apps use to implement
Add this line to your application’s Gemfile:
And then execute:
$ bundle install
Include the concern into a controller:
And it will add before_action methods to:
The following functions are available:
When run in development mode (RAILS_ENV=development), a cookie on
dev.gov.uk is used instead of custom headers.
There are test helpers for both request and feature specs to log the
user in. Include the relevant helper:
And then log the user in:
If you need a specific session identifier, for example to match
against it in WebMock stubs or with the gds-api-adapters test
helpers, you can pass it as an argument:
The gem is available as open source under the terms of the MIT License.