Class: SignIn::Idme::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
45
46
47
|
# File 'lib/sign_in/idme/configuration.rb', line 45
def auth_path
'oauth/authorize'
end
|
#base_path ⇒ Object
9
10
11
|
# File 'lib/sign_in/idme/configuration.rb', line 9
def base_path
Settings.idme.oauth_url
end
|
#client_assertion_expiration_seconds ⇒ Object
65
66
67
|
# File 'lib/sign_in/idme/configuration.rb', line 65
def client_assertion_expiration_seconds
1000
end
|
#client_assertion_type ⇒ Object
57
58
59
|
# File 'lib/sign_in/idme/configuration.rb', line 57
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/idme/configuration.rb', line 29
def client_cert_path
Settings.idme.client_cert_path
end
|
#client_id ⇒ Object
13
14
15
|
# File 'lib/sign_in/idme/configuration.rb', line 13
def client_id
Settings.idme.client_id
end
|
#client_key_path ⇒ Object
25
26
27
|
# File 'lib/sign_in/idme/configuration.rb', line 25
def client_key_path
Settings.idme.client_key_path
end
|
#client_secret ⇒ Object
17
18
19
|
# File 'lib/sign_in/idme/configuration.rb', line 17
def client_secret
Settings.idme.client_secret
end
|
#connection ⇒ Object
Faraday connection object with breakers, snakecase and json response middleware
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# File 'lib/sign_in/idme/configuration.rb', line 108
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
61
62
63
|
# File 'lib/sign_in/idme/configuration.rb', line 61
def grant_type
'authorization_code'
end
|
#idme_scope ⇒ Object
37
38
39
|
# File 'lib/sign_in/idme/configuration.rb', line 37
def idme_scope
Constants::Auth::IDME_LOA3
end
|
#jwks_cache_expiration ⇒ Object
97
98
99
|
# File 'lib/sign_in/idme/configuration.rb', line 97
def jwks_cache_expiration
30.minutes
end
|
#jwks_cache_key ⇒ Object
93
94
95
|
# File 'lib/sign_in/idme/configuration.rb', line 93
def jwks_cache_key
'idme_public_jwks'
end
|
#jwt_decode_algorithm ⇒ Object
73
74
75
|
# File 'lib/sign_in/idme/configuration.rb', line 73
def jwt_decode_algorithm
'RS256'
end
|
#log_credential ⇒ Object
85
86
87
|
# File 'lib/sign_in/idme/configuration.rb', line 85
def log_credential
false
end
|
#log_prefix ⇒ Object
101
102
103
|
# File 'lib/sign_in/idme/configuration.rb', line 101
def log_prefix
'[SignIn][Idme][Service]'
end
|
#public_jwks_path ⇒ Object
41
42
43
|
# File 'lib/sign_in/idme/configuration.rb', line 41
def public_jwks_path
'oidc/.well-known/jwks'
end
|
#redirect_uri ⇒ Object
21
22
23
|
# File 'lib/sign_in/idme/configuration.rb', line 21
def redirect_uri
Settings.idme.redirect_uri
end
|
#response_type ⇒ Object
69
70
71
|
# File 'lib/sign_in/idme/configuration.rb', line 69
def response_type
'code'
end
|
#service_name ⇒ Object
33
34
35
|
# File 'lib/sign_in/idme/configuration.rb', line 33
def service_name
'idme'
end
|
#sign_up_operation ⇒ Object
89
90
91
|
# File 'lib/sign_in/idme/configuration.rb', line 89
def sign_up_operation
'signup'
end
|
#ssl_cert ⇒ Object
81
82
83
|
# File 'lib/sign_in/idme/configuration.rb', line 81
def ssl_cert
OpenSSL::X509::Certificate.new(File.read(client_cert_path))
end
|
#ssl_key ⇒ Object
77
78
79
|
# File 'lib/sign_in/idme/configuration.rb', line 77
def ssl_key
OpenSSL::PKey::RSA.new(File.read(client_key_path))
end
|
#token_path ⇒ Object
49
50
51
|
# File 'lib/sign_in/idme/configuration.rb', line 49
def token_path
'oauth/token'
end
|
#userinfo_path ⇒ Object
53
54
55
|
# File 'lib/sign_in/idme/configuration.rb', line 53
def userinfo_path
'api/public/v3/userinfo.json'
end
|