README.md in gds-sso-0.4.3 vs README.md in gds-sso-0.5.0

- old
+ new

@@ -10,11 +10,11 @@ For more details on OmniAuth and oAuth2 integration see https://github.com/intridea/omniauth ## Integration with a Rails 3+ app -To use gds-sso tou will need an oauth client ID and secret for sign-on-o-tron or a compatible system. +To use gds-sso you will need an oauth client ID and secret for sign-on-o-tron or a compatible system. These can be provided by one of the team with admin access to sign-on-o-tron. Then include the gem in your Gemfile: gem 'gds-sso', :git => 'https://github.com/alphagov/gds-sso.git' @@ -36,6 +36,17 @@ config.basic_auth_password = 'secret' end The user model needs to respond to klass.find_by_uid(uid), and must include the GDS::SSO::User module. -You also need to include `GDS::SSO::ControllerMethods` in your ApplicationController \ No newline at end of file +You also need to include `GDS::SSO::ControllerMethods` in your ApplicationController + +## 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: + + GDS::SSO.test_user || GDS::SSO::Config.user_klass.first + +To make it use a real strategy (e.g. if you're testing an app against the signon server), set an environment variable when you run your app: + + GDS_SSO_STRATEGY=real bundle exec rails s +