Skip to content

Commit

Permalink
Add note about running in mock/real mode in development.
Browse files Browse the repository at this point in the history
  • Loading branch information
heathd committed Apr 16, 2012
1 parent 00d9ca9 commit 8ae3536
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,15 @@ Create a `config/initializers/gds-sso.rb` that looks like:

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
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

0 comments on commit 8ae3536

Please sign in to comment.