Module: Gitlab::ExternalAuthorization::Config

Extended by:
Config
Included in:
Gitlab::ExternalAuthorization, Client, Config
Defined in:
lib/gitlab/external_authorization/config.rb

Instance Method Summary collapse

Instance Method Details

#client_certObject


24
25
26
# File 'lib/gitlab/external_authorization/config.rb', line 24

def client_cert
  application_settings.external_auth_client_cert
end

#client_keyObject


28
29
30
# File 'lib/gitlab/external_authorization/config.rb', line 28

def client_key
  application_settings.external_auth_client_key
end

#client_key_passObject


32
33
34
# File 'lib/gitlab/external_authorization/config.rb', line 32

def client_key_pass
  application_settings.external_auth_client_key_pass
end

#enabled?Boolean

Returns:

  • (Boolean)

16
17
18
# File 'lib/gitlab/external_authorization/config.rb', line 16

def enabled?
  application_settings.external_authorization_service_enabled
end

#has_tls?Boolean

Returns:

  • (Boolean)

36
37
38
# File 'lib/gitlab/external_authorization/config.rb', line 36

def has_tls?
  client_cert.present? && client_key.present?
end

#perform_check?Boolean

Returns:

  • (Boolean)

20
21
22
# File 'lib/gitlab/external_authorization/config.rb', line 20

def perform_check?
  enabled? && service_url.present?
end

#service_urlObject


12
13
14
# File 'lib/gitlab/external_authorization/config.rb', line 12

def service_url
  application_settings.external_authorization_service_url
end

#timeoutObject


8
9
10
# File 'lib/gitlab/external_authorization/config.rb', line 8

def timeout
  application_settings.external_authorization_service_timeout
end