Class: MAP::SecurityToken::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, #current_module, #request_options, #service_exception
Instance Method Details
#appointments_client_id ⇒ Object
25
26
27
|
# File 'lib/map/security_token/configuration.rb', line 25
def appointments_client_id
Settings.map_services.appointments_client_id
end
|
#base_path ⇒ Object
9
10
11
|
# File 'lib/map/security_token/configuration.rb', line 9
def base_path
Settings.map_services.oauth_url
end
|
#chatbot_client_id ⇒ Object
13
14
15
|
# File 'lib/map/security_token/configuration.rb', line 13
def chatbot_client_id
Settings.map_services.chatbot_client_id
end
|
#check_in_client_id ⇒ Object
21
22
23
|
# File 'lib/map/security_token/configuration.rb', line 21
def check_in_client_id
Settings.map_services.check_in_client_id
end
|
#client_assertion_certificate ⇒ Object
77
78
79
|
# File 'lib/map/security_token/configuration.rb', line 77
def client_assertion_certificate
OpenSSL::X509::Certificate.new(File.read(client_cert_path))
end
|
#client_assertion_encode_algorithm ⇒ Object
57
58
59
|
# File 'lib/map/security_token/configuration.rb', line 57
def client_assertion_encode_algorithm
'RS512'
end
|
#client_assertion_expiration_seconds ⇒ Object
53
54
55
|
# File 'lib/map/security_token/configuration.rb', line 53
def client_assertion_expiration_seconds
300
end
|
#client_assertion_patient_id_type ⇒ Object
65
66
67
|
# File 'lib/map/security_token/configuration.rb', line 65
def client_assertion_patient_id_type
'icn'
end
|
#client_assertion_private_key ⇒ Object
73
74
75
|
# File 'lib/map/security_token/configuration.rb', line 73
def client_assertion_private_key
OpenSSL::PKey::RSA.new(File.read(client_key_path))
end
|
#client_assertion_role ⇒ Object
61
62
63
|
# File 'lib/map/security_token/configuration.rb', line 61
def client_assertion_role
'veteran'
end
|
#client_assertion_type ⇒ Object
45
46
47
|
# File 'lib/map/security_token/configuration.rb', line 45
def client_assertion_type
'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'
end
|
#client_cert_path ⇒ Object
33
34
35
|
# File 'lib/map/security_token/configuration.rb', line 33
def client_cert_path
Settings.map_services.client_cert_path
end
|
#client_key_path ⇒ Object
29
30
31
|
# File 'lib/map/security_token/configuration.rb', line 29
def client_key_path
Settings.map_services.client_key_path
end
|
#connection ⇒ Object
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/map/security_token/configuration.rb', line 81
def connection
@connection ||= Faraday.new(
base_path,
headers: ,
request: request_options
) do |conn|
conn.use :breakers
conn.use Faraday::Response::RaiseError
conn.adapter Faraday.default_adapter
conn.response :json, content_type: /\bjson/
conn.response :betamocks if Settings.map_services.secure_token_service.mock
end
end
|
#grant_type ⇒ Object
49
50
51
|
# File 'lib/map/security_token/configuration.rb', line 49
def grant_type
'client_credentials'
end
|
#logging_prefix ⇒ Object
69
70
71
|
# File 'lib/map/security_token/configuration.rb', line 69
def logging_prefix
'[MAP][SecurityToken][Service]'
end
|
#service_name ⇒ Object
37
38
39
|
# File 'lib/map/security_token/configuration.rb', line 37
def service_name
'map_security_token_service'
end
|
#sign_up_service_client_id ⇒ Object
17
18
19
|
# File 'lib/map/security_token/configuration.rb', line 17
def sign_up_service_client_id
Settings.map_services.sign_up_service_client_id
end
|
#token_path ⇒ Object
41
42
43
|
# File 'lib/map/security_token/configuration.rb', line 41
def token_path
'sts/oauth/v1/token'
end
|