README.md in rails_sso-0.5.0 vs README.md in rails_sso-0.6.0

- old
+ new

@@ -46,10 +46,19 @@ config.provider_profile_path = '/api/v1/profile' # set if you support single sign out config.provider_sign_out_path = '/api/v1/session' # enable cache (will use Rails.cache store) config.use_cache = Rails.application.config.action_controller.perform_caching + # test & development mode + config.test_mode = ENV['mock_sso'] + config.profile_mock = { + user: 'John Blacksmith', + uid: '169783' + } + # custom failure app + # more: https://github.com/hassox/warden/wiki/Failures + config.failure_app = MyFailureApp end ``` And mount it: @@ -81,22 +90,26 @@ * `sso.sign_in_path` * `sso.sign_out_path` ## Testing & Development mode -You can turn on "test mode" by enabling [OmniAuth test mode](https://github.com/intridea/omniauth/wiki/Integration-Testing). +You can turn on "test mode" by enabling test mode. It will also automatically enable [OmniAuth test mode](https://github.com/intridea/omniauth/wiki/Integration-Testing). ```ruby -OmniAuth.config.test_mode = true +RailsSso.configure do + config.test_mode = true +end ``` -To mock user data use OmniAuth `mock_auth` feature with your provider. +Mock data should be passed to `profile_mock` configuration. ```ruby -OmniAuth.config.mock_auth[:example] = OmniAuth::AuthHash.new({ - name: 'John Kowalski', - uid: '42' -}) +RailsSso.configure do |config| + config.profile_mock = { + name: 'John Kowalski', + uid: '42' + } +end ``` ## Contributing 1. Fork it