Module: DaVinciPASTestKit::SessionIdentification
- Included in:
- AbstractApprovalSubmitTest, AbstractDenialSubmitTest, AbstractGatherMustSupportTest, AbstractModificationSubmitTest, AbstractSubscriptionCreateTest, DaVinciPASV201::PASClientPendedSubmitTest, DaVinciPASV221::AbstractClaimUpdateSubmitTest, DaVinciPASV221::PASClientOperationFailureSubmitTest, DaVinciPASV221::PASClientPendedSubmitTest, DaVinciPASV221::PASClientProcessingErrorSubmitTest
- Defined in:
- lib/davinci_pas_test_kit/client/session_identification.rb
Instance Method Summary collapse
-
#bearer_token_to_wait_identifier(token) ⇒ Object
interpret the bearer token structure to determine the wait identifer - if structured like a token returned by the simulated Auth server, return the client URI - otherwise, use the raw token (provided token).
- #session_endpoint_url(endpoint, client_id, session_url_path) ⇒ Object
- #session_wait_identifier(client_id, session_url_path) ⇒ Object
Instance Method Details
#bearer_token_to_wait_identifier(token) ⇒ Object
interpret the bearer token structure to determine the wait identifer
- if structured like a token returned by the simulated Auth server, return the client URI
- otherwise, use the raw token (provided token)
37 38 39 40 41 42 |
# File 'lib/davinci_pas_test_kit/client/session_identification.rb', line 37 def bearer_token_to_wait_identifier(token) client_id = UDAPSecurityTestKit::MockUDAPServer.issued_token_to_client_id(token) return client_id if client_id.present? token end |
#session_endpoint_url(endpoint, client_id, session_url_path) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/davinci_pas_test_kit/client/session_identification.rb', line 14 def session_endpoint_url(endpoint, client_id, session_url_path) path = if client_id.present? '' elsif session_url_path.present? session_url_path else test_session_id end case endpoint when :submit session_submit_url(path) when :inquire session_inquire_url(path) when :subscription session_fhir_subscription_url(path) end end |
#session_wait_identifier(client_id, session_url_path) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/davinci_pas_test_kit/client/session_identification.rb', line 5 def session_wait_identifier(client_id, session_url_path) # look at test config and determine the wait identifier to use # at somepoint this would be an inferno type, for now, just two options return client_id if client_id.present? return session_url_path if session_url_path.present? test_session_id end |