Module: PublishingPlatform::SSO::Config
- Defined in:
- lib/publishing_platform_sso/config.rb
Constant Summary collapse
- @@user_model =
"User"- @@oauth_id =
ENV.fetch("PUBLISHING_PLATFORM_SSO_OAUTH_ID", "test-oauth-id")
- @@oauth_secret =
ENV.fetch("PUBLISHING_PLATFORM_SSO_OAUTH_SECRET", "test-oauth-secret")
- @@oauth_root_url =
Plek.new.external_url_for(“signon”) # TODO: need to implement this functionality
"http://signon.dev.publishing-platform.co.uk"- @@auth_valid_for =
20 * 3600
- @@intercept_401_responses =
true- @@connection_opts =
{ request: { open_timeout: 5, }, }
Class Method Summary collapse
Class Method Details
.permissions_for_dummy_api_user ⇒ Object
43 44 45 |
# File 'lib/publishing_platform_sso/config.rb', line 43 def self. %w[signin].push(*) end |
.use_mock_strategies? ⇒ Boolean
51 52 53 54 55 56 57 58 59 |
# File 'lib/publishing_platform_sso/config.rb', line 51 def self.use_mock_strategies? default_strategy = if %w[development test].include?(Rails.env) "mock" else "real" end ENV.fetch("PUBLISHING_PLATFORM_SSO_STRATEGY", default_strategy) == "mock" end |
.user_klass ⇒ Object
47 48 49 |
# File 'lib/publishing_platform_sso/config.rb', line 47 def self.user_klass user_model.to_s.constantize end |