Class: SignIn::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, #current_module, #request_options, #service_exception
Instance Method Details
#auth_path ⇒ Object
57
58
59
|
# File 'lib/sign_in/logingov/configuration.rb', line 57
def auth_path
'openid_connect/authorize'
end
|
#base_path ⇒ Object
9
10
11
|
# File 'lib/sign_in/logingov/configuration.rb', line 9
def base_path
Settings.logingov.oauth_url
end
|
#client_assertion_expiration_seconds ⇒ Object
45
46
47
|
# File 'lib/sign_in/logingov/configuration.rb', line 45
def client_assertion_expiration_seconds
1000
end
|
#client_assertion_type ⇒ Object
37
38
39
|
# File 'lib/sign_in/logingov/configuration.rb', line 37
def client_assertion_type
'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'
end
|
#client_cert_path ⇒ Object
29
30
31
|
# File 'lib/sign_in/logingov/configuration.rb', line 29
def client_cert_path
Settings.logingov.client_cert_path
end
|
#client_id ⇒ Object
13
14
15
|
# File 'lib/sign_in/logingov/configuration.rb', line 13
def client_id
Settings.logingov.client_id
end
|
#client_key_path ⇒ Object
25
26
27
|
# File 'lib/sign_in/logingov/configuration.rb', line 25
def client_key_path
Settings.logingov.client_key_path
end
|
#connection ⇒ Object
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# File 'lib/sign_in/logingov/configuration.rb', line 109
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
|
#grant_type ⇒ Object
41
42
43
|
# File 'lib/sign_in/logingov/configuration.rb', line 41
def grant_type
'authorization_code'
end
|
#jwks_cache_expiration ⇒ Object
101
102
103
|
# File 'lib/sign_in/logingov/configuration.rb', line 101
def jwks_cache_expiration
30.minutes
end
|
#jwks_cache_key ⇒ Object
97
98
99
|
# File 'lib/sign_in/logingov/configuration.rb', line 97
def jwks_cache_key
'logingov_public_jwks'
end
|
#jwt_decode_algorithm ⇒ Object
77
78
79
|
# File 'lib/sign_in/logingov/configuration.rb', line 77
def jwt_decode_algorithm
'RS256'
end
|
#log_credential ⇒ Object
89
90
91
|
# File 'lib/sign_in/logingov/configuration.rb', line 89
def log_credential
false
end
|
#log_prefix ⇒ Object
105
106
107
|
# File 'lib/sign_in/logingov/configuration.rb', line 105
def log_prefix
'[SignIn][Logingov][Service]'
end
|
#logout_path ⇒ Object
65
66
67
|
# File 'lib/sign_in/logingov/configuration.rb', line 65
def logout_path
'openid_connect/logout'
end
|
#logout_redirect_uri ⇒ Object
21
22
23
|
# File 'lib/sign_in/logingov/configuration.rb', line 21
def logout_redirect_uri
Settings.logingov.logout_redirect_uri
end
|
#prompt ⇒ Object
49
50
51
|
# File 'lib/sign_in/logingov/configuration.rb', line 49
def prompt
'select_account'
end
|
#public_jwks_path ⇒ Object
73
74
75
|
# File 'lib/sign_in/logingov/configuration.rb', line 73
def public_jwks_path
'/api/openid_connect/certs'
end
|
#redirect_uri ⇒ Object
17
18
19
|
# File 'lib/sign_in/logingov/configuration.rb', line 17
def redirect_uri
Settings.logingov.redirect_uri
end
|
#response_type ⇒ Object
53
54
55
|
# File 'lib/sign_in/logingov/configuration.rb', line 53
def response_type
'code'
end
|
#service_name ⇒ Object
93
94
95
|
# File 'lib/sign_in/logingov/configuration.rb', line 93
def service_name
'logingov'
end
|
#single_sign_out_uri ⇒ Object
33
34
35
|
# File 'lib/sign_in/logingov/configuration.rb', line 33
def single_sign_out_uri
Settings.logingov.sign_out_uri
end
|
#ssl_cert ⇒ Object
85
86
87
|
# File 'lib/sign_in/logingov/configuration.rb', line 85
def ssl_cert
OpenSSL::X509::Certificate.new(File.read(client_cert_path))
end
|
#ssl_key ⇒ Object
81
82
83
|
# File 'lib/sign_in/logingov/configuration.rb', line 81
def ssl_key
OpenSSL::PKey::RSA.new(File.read(client_key_path))
end
|
#token_path ⇒ Object
61
62
63
|
# File 'lib/sign_in/logingov/configuration.rb', line 61
def token_path
'api/openid_connect/token'
end
|
#userinfo_path ⇒ Object
69
70
71
|
# File 'lib/sign_in/logingov/configuration.rb', line 69
def userinfo_path
'api/openid_connect/userinfo'
end
|