Class: InheritedProofing::Logingov::Configuration
Instance Attribute Summary
#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent
Instance Method Summary
collapse
#breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #request_options, #service_exception
Instance Method Details
#auth_path ⇒ Object
40
41
42
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 40
def auth_path
'openid_connect/authorize'
end
|
#base_path ⇒ Object
8
9
10
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 8
def base_path
Settings.logingov.oauth_url
end
|
#client_assertion_expiration_seconds ⇒ Object
28
29
30
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 28
def client_assertion_expiration_seconds
1000
end
|
#client_cert_path ⇒ Object
24
25
26
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 24
def client_cert_path
Settings.logingov.client_cert_path
end
|
#client_id ⇒ Object
12
13
14
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 12
def client_id
Settings.logingov.client_id
end
|
#client_key_path ⇒ Object
20
21
22
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 20
def client_key_path
Settings.logingov.client_key_path
end
|
#connection ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 56
def connection
@connection ||= Faraday.new(
base_path,
headers: ,
request: request_options,
ssl: { client_cert: ssl_cert,
client_key: ssl_key }
) do |conn|
conn.use :breakers
conn.use Faraday::Response::RaiseError
conn.response :snakecase
conn.response :json, content_type: /\bjson$/
conn.adapter Faraday.default_adapter
end
end
|
#prompt ⇒ Object
32
33
34
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 32
def prompt
'select_account'
end
|
#redirect_uri ⇒ Object
16
17
18
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 16
def redirect_uri
Settings.logingov.inherited_proofing_redirect_uri
end
|
#response_type ⇒ Object
36
37
38
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 36
def response_type
'code'
end
|
#service_name ⇒ Object
52
53
54
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 52
def service_name
'logingov_inherited_proofing'
end
|
#ssl_cert ⇒ Object
48
49
50
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 48
def ssl_cert
OpenSSL::X509::Certificate.new(File.read(client_cert_path))
end
|
#ssl_key ⇒ Object
44
45
46
|
# File 'lib/inherited_proofing/logingov/configuration.rb', line 44
def ssl_key
OpenSSL::PKey::RSA.new(File.read(client_key_path))
end
|