SMART EHR-Launch Implementation (#4128)
commitfe8364d0fcc619300b290614cda86c8c5de5989f
authorStephen Nielson <stephen@nielson.org>
Wed, 30 Dec 2020 22:24:33 +0000 (30 17:24 -0500)
committerGitHub <noreply@github.com>
Wed, 30 Dec 2020 22:24:33 +0000 (30 14:24 -0800)
tree572efd010093caae7172deca895fc70f0be2ca07
parent8f4a4de3dba7145ecaab8822ed53e73dc8a44dfd
SMART EHR-Launch Implementation (#4128)

* Add Launch URI to app registration.

* Fix fhirUser propulation

* Fixed uuid throwing error from server.

* Remove comment

* Send SMART scope as part of token response.

Updated the SMART capabilities and made sure the scopes authorized
in the access token are passed back as sibling parameter in the
access token.

* Refresh token now works for ehr-launch

The refresh token was breaking because of how we were dealing with the
site id for both the ScopeRepository validation and the way league
retrieves it's scope request parameter.  This fixes it and the inferno
SMART tests now validate correctly.

* Style fixes.  SMART #4076 #4120

* Fix CSRF escape, remove launch_uri

Removed the launch uri pieces and the bypass for the CSRF escape.

Now SMART apps can use the initiate_login_uri to specify the SMART
launch URI to use.

* Not sure how we lost quotes here.

* quick commit

* fix

Co-authored-by: Stephen Nielson <snielson@discoverandchange.com>
Co-authored-by: Brady Miller <brady.g.miller@gmail.com>
12 files changed:
apis/dispatch.php
interface/smart/register-app.php
src/Common/Auth/OpenIDConnect/Entities/ClientEntity.php
src/Common/Auth/OpenIDConnect/Entities/UserEntity.php
src/Common/Auth/OpenIDConnect/Grant/CustomRefreshTokenGrant.php [new file with mode: 0644]
src/Common/Auth/OpenIDConnect/IdTokenSMARTResponse.php
src/Common/Auth/OpenIDConnect/Repositories/ClientRepository.php
src/Common/Auth/OpenIDConnect/Repositories/ScopeRepository.php
src/FHIR/SMART/Capability.php
src/FHIR/SMART/SmartLaunchController.php
src/RestControllers/AuthorizationController.php
src/Services/PractitionerService.php