Touchstone FHIR Testing
2.0.0 - current International flag

Touchstone FHIR Testing v2.0.0. This is the current published version. For a full list of available versions, see the Directory of published versions

Example TestScript: TestScript OAuth2 Standalone Launch Example

Active as of 2023-07-03

Generated Narrative: TestScript

Resource TestScript "oauth2-standalone-launch"

Profile: AEGIS Touchstone Testing TestScript Profile

url: http://touchstone.aegis.net/touchstone/fhir/testing/TestScript/oauth2-standalone-launch

version: 2.0.0

name: OAuth2StandaloneLaunch

status: active

date: 2023-07-03

publisher: AEGIS.net, Inc.

contact: AEGIS.net, Inc.: https://www.aegis.net, Richard Ettema: mailto:richard.ettema@aegis.net

description: Demonstrate the use of the oauth2-authorize operation and the new extensions variable-paramField, operation-oauth2AuthzRequestId, operation-oauth2AuthzRedirectId, assert-variable and assert-stopTestOnFail.

jurisdiction: World (m49.htm#001)

copyright: (c) AEGIS.net, Inc. 2015+

variable

AEGIS Touchstone Testing TestScript Variable ParamField Extension: state

name: oauth2AuthzRequest1StateParam

sourceId: oauth2AuthzRequest1

variable

AEGIS Touchstone Testing TestScript Variable ParamField Extension: redirect_uri

name: oauth2AuthzRequest1RedirectUri

sourceId: oauth2AuthzRequest1

variable

AEGIS Touchstone Testing TestScript Variable ParamField Extension: code

name: oauth2AuthzRedirect1AuthCode

sourceId: oauth2AuthzRedirect1

variable

name: authorizeEndpoint

defaultValue: https://oauth2.aegis.net/auth

variable

name: oauth2AuthzRequestedScopes

defaultValue: launch/patient openid fhirUser offline_access patient/Patient.read

test

id

StandaloneLaunchWithPatientScope

AEGIS Touchstone Testing TestScript Test Manual Completion Extension: pass

name: Standalone Launch With Patient Scope

description: Perform Standalone SMART launch sequence and test OpenID Connect and token refresh functionality.

action

Operations

-ExtensionTypeDescriptionEncodeRequestUrlUrl
*, , oauth2-authorize (Details: http://touchstone.aegis.net/touchstone/fhir/testing/CodeSystem/codesystem-testscript-operation-codes code oauth2-authorize = 'oauth2-authorize', stated as 'null')Redirect user to the authorize endpoint for target test system specified in smart configurationfalse${authorizeEndpoint}?client_id=clientId&scope=${oauth2AuthzRequestedScopes}

action

Asserts

-ExtensionDescriptionDirectionOperatorRequestURLSourceIdWarningOnly
*OAuth server redirects client browser to app redirect URI. Client browser redirected from OAuth server to redirect URI of client app as described in SMART authorization sequence.requestcontains/oauth2/authcode/redirectoauth2AuthzRedirect1false

action

Asserts

-ExtensionDescriptionDirectionOperatorValueWarningOnly
*, Direct comparison example.requestequals${authorizeEndpoint}false