Module: GoogleSsoConfiguration

Extended by:
ActiveSupport::Concern
Defined in:
lib/app/models/concerns/google_sso_configuration.rb

Overview

Google SSO Configuration

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/app/models/concerns/google_sso_configuration.rb', line 9

def self.included(base)
  base.class_eval do
    #
    # Fields
    #
    field :google_client_id, type: String
    field :google_client_secret, type: String
  end
end

Instance Method Details

#google_sso_configured?Boolean

Determine if AWS is configured

Returns:

  • (Boolean)


29
30
31
# File 'lib/app/models/concerns/google_sso_configuration.rb', line 29

def google_sso_configured?
  google_client_id.present? && google_client_secret.present?
end

#secure_fieldsObject

Make sure the password doesn’t get blanked out on an update



22
23
24
# File 'lib/app/models/concerns/google_sso_configuration.rb', line 22

def secure_fields
  super + %i[google_client_secret]
end