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 =
PublishingPlatformLocation.find("signon")
- @@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
44 45 46 |
# File 'lib/publishing_platform_sso/config.rb', line 44 def self. %w[signin].push(*) end |
.use_mock_strategies? ⇒ Boolean
52 53 54 55 56 57 58 59 60 |
# File 'lib/publishing_platform_sso/config.rb', line 52 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
48 49 50 |
# File 'lib/publishing_platform_sso/config.rb', line 48 def self.user_klass user_model.to_s.constantize end |