README.md in gds-sso-13.4.0 vs README.md in gds-sso-13.5.0

- old
+ new

@@ -10,11 +10,11 @@ - [publisher](https://github.com/alphagov/publisher) - [search-admin](https://github.com/alphagov/search-admin) ## Usage -### Integration with a Rails 3+ app +### Integration with a Rails 4+ app To use gds-sso you will need an oAuth client ID and secret for Signon or a compatible system. These can be provided by one of the team with admin access to Signon. Then include the gem in your Gemfile: @@ -128,9 +128,21 @@ # Pass in a caching adapter cache bearer token requests. config.cache = Rails.cache end ``` +If you are using a Rails 5 app in +[api_only](http://guides.rubyonrails.org/api_app.html) mode this gem will +automatically disable the oauth layers which use session persistence. You can +configure this gem to be in api_only mode (or not) with: + +```ruby +GDS::SSO.config do |config| + # ... + # Only support bearer token authentication and send responses in JSON + config.api_only = true +end +``` ### Use in development mode In development, you generally want to be able to run an application without needing to run your own SSO server to be running as well. GDS-SSO facilitates this by using a 'mock' mode in development. Mock mode loads an arbitrary user from the local application's user tables: