Class: SMARTAppLaunch::MockSMARTServer::TokenEndpoint
- Inherits:
-
Inferno::DSL::SuiteEndpoint
- Object
- Inferno::DSL::SuiteEndpoint
- SMARTAppLaunch::MockSMARTServer::TokenEndpoint
show all
- Includes:
- SMARTTokenResponseCreation, URLs
- Defined in:
- lib/smart_app_launch/endpoints/mock_smart_server/token_endpoint.rb
Instance Method Summary
collapse
#authenticated?, #confidential_asymmetric_authenticated?, #confidential_symmetric_authenticated?, #make_smart_authorization_code_token_response, #make_smart_client_credential_token_response, #make_smart_refresh_token_response, #smart_construct_id_token, #smart_pkce_valid?, #smart_requested_scope_context
Methods included from URLs
#client_authorization_url, #client_base_url, #client_fhir_base_url, #client_introspection_url, #client_resume_fail_url, #client_resume_pass_url, #client_smart_discovery_url, #client_suite_id, #client_token_url
Instance Method Details
#make_response ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/smart_app_launch/endpoints/mock_smart_server/token_endpoint.rb', line 25
def make_response
return make_smart_client_credential_token_response if request.params[:grant_type] == CLIENT_CREDENTIALS_TAG
suite_options_list = Inferno::Repositories::TestSessions.new.find(result.test_session_id)&.suite_options
suite_options_hash = suite_options_list&.map { |option| [option.id, option.value] }&.to_h
smart_authentication_approach = SMARTClientOptions.smart_authentication_approach(suite_options_hash)
case request.params[:grant_type]
when AUTHORIZATION_CODE_TAG
make_smart_authorization_code_token_response(smart_authentication_approach)
when REFRESH_TOKEN_TAG
make_smart_refresh_token_response(smart_authentication_approach)
else
MockSMARTServer.update_response_for_error(
response,
"unsupported grant_type: #{request.params[:grant_type]}"
)
end
end
|
#test_run_identifier ⇒ Object
#update_result ⇒ Object
45
46
47
|
# File 'lib/smart_app_launch/endpoints/mock_smart_server/token_endpoint.rb', line 45
def update_result
nil end
|