Sha256: fd1e3ceebc566e761632d97afdf9c6a4f93d46b145f2e1fb6aaf3b311279256f

Contents?: true

Size: 664 Bytes

Versions: 10

Compression:

Stored size: 664 Bytes

Contents

module GDS
  module SSO
    module Config
      # Name of the User class
      mattr_accessor :user_model
      @@user_model = "User"

      # OAuth ID
      mattr_accessor :oauth_id

      # OAuth Secret
      mattr_accessor :oauth_secret

      # Location of the OAuth server
      mattr_accessor :oauth_root_url
      @@oauth_root_url = "http://localhost:3001"

      mattr_accessor :auth_valid_for
      @@auth_valid_for = 20 * 3600

      def self.user_klass
        user_model.to_s.constantize
      end

      def self.use_mock_strategies?
        ['development', 'test'].include?(Rails.env) && ENV['GDS_SSO_STRATEGY'] != 'real'
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gds-sso-12.0.0 lib/gds-sso/config.rb
gds-sso-11.2.1 lib/gds-sso/config.rb
gds-sso-11.2.0 lib/gds-sso/config.rb
gds-sso-11.1.0 lib/gds-sso/config.rb
gds-sso-11.0.0 lib/gds-sso/config.rb
gds-sso-10.1.0 lib/gds-sso/config.rb
gds-sso-10.0.1 lib/gds-sso/config.rb
gds-sso-10.0.0 lib/gds-sso/config.rb
gds-sso-9.4.0 lib/gds-sso/config.rb
gds-sso-9.3.0 lib/gds-sso/config.rb