Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ To run the example tutorial, you need to set the following environment variables
|------------------------------|-------------------------------------------------------------------------------|
| `KEYCLOAK_CLIENT_ID` | `test-client-cis2` |
| `KEYCLOAK_CLIENT_SECRET` | `d32d122e-8f65-4077-bb34-14ac4c2c3b41` |
| `KEYCLOAK_AUTHORITY` | `https://identity.ptl.api.platform.nhs.uk/auth/realms/NHS-Login-mock-sandbox` |
| `KEYCLOAK_AUTHORITY` | `https://identity.ptl.api.platform.nhs.uk/realms/NHS-Login-mock-sandbox` |
| `KEYCLOAK_PRIVATE_KEY_PATH` | The path to your private key for the Keycloak realm |
| `OAUTH_ENDPOINT` | `https://sandbox.api.service.nhs.uk/oauth2-mock` |
| `ENDPOINT` | `https://sandbox.api.service.nhs.uk/hello-world/hello/user` |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export PROVIDER_OAUTH_ENDPOINT=https://identity.ptl.api.platform.nhs.uk/auth/realms/Cis2-mock-sandbox/protocol/openid-connect
export PROVIDER_OAUTH_ENDPOINT=https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-sandbox/protocol/openid-connect
export PROVIDER_CLIENT_ID=hello-world-tutorials
export PROVIDER_CLIENT_SECRET=dde091bb-97af-483e-8d3e-02d6592cf318
export PROVIDER_REDIRECT_URI=http://localhost:8080/callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public function auth()
'clientId' => 'hello-world-tutorials' , // The client ID assigned to you by the provider
'client_secret' => 'dde091bb-97af-483e-8d3e-02d6592cf318',
'redirectUri' => 'http://localhost:8000/hello',
'urlAuthorize' => 'https://identity.ptl.api.platform.nhs.uk/auth/realms/Cis2-mock-sandbox/protocol/openid-connect/auth',
'urlAccessToken' => 'https://identity.ptl.api.platform.nhs.uk/auth/realms/Cis2-mock-sandbox/protocol/openid-connect/token',
'urlAuthorize' => 'https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-sandbox/protocol/openid-connect/auth',
'urlAccessToken' => 'https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-sandbox/protocol/openid-connect/token',
'scopes' => ['openid', 'nationalrbacaccess'],
'urlResourceOwnerDetails' => ''
]);
Expand All @@ -50,7 +50,7 @@ public function callback(): Response {

$code = $_GET['code'];
$IStokenUrl = 'https://sandbox.api.service.nhs.uk/oauth2-mock/token';
$tokenUrl = 'https://identity.ptl.api.platform.nhs.uk/auth/realms/Cis2-mock-sandbox/protocol/openid-connect/token';
$tokenUrl = 'https://identity.ptl.api.platform.nhs.uk/realms/Cis2-mock-sandbox/protocol/openid-connect/token';

$APPPrivateKey_path = $_ENV['CLIENT_ID'];
$APPClientSecret = $_ENV['CLIENT_SECRET'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To run the example tutorial, you need to set the following environment variables
| Variable name | Description |
|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| `KEYCLOAK_CLIENT_ID` | `test-client-nhs-login` |
| `KEYCLOAK_AUTHORITY` | `https://identity.ptl.api.platform.nhs.uk/auth/realms/NHS-Login-mock-sandbox` |
| `KEYCLOAK_AUTHORITY` | `https://identity.ptl.api.platform.nhs.uk/realms/NHS-Login-mock-sandbox` |
| `KEYCLOAK_PRIVATE_KEY_PATH` | The path to the provider key. NHS login will provide this key, but for this tutorial you can use a our mock NHS login provider key |
| `OAUTH_ENDPOINT` | `https://sandbox.api.service.nhs.uk/oauth2-mock` |
| `ENDPOINT` | `https://sandbox.api.service.nhs.uk/hello-world/hello/user` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function auth()
$provider = new \League\OAuth2\Client\Provider\GenericProvider([
'clientId' => 'hello-world-tutorials' , // The client ID assigned to you by the provider
'redirectUri' => 'http://localhost:8000/hello',
'urlAuthorize' => 'https://identity.ptl.api.platform.nhs.uk/auth/realms/NHS-Login-mock-sandbox/protocol/openid-connect/auth',
'urlAccessToken' => 'https://identity.ptl.api.platform.nhs.uk/auth/realms/NHS-Login-mock-sandbox/protocol/openid-connect/token',
'urlAuthorize' => 'https://identity.ptl.api.platform.nhs.uk/realms/NHS-Login-mock-sandbox/protocol/openid-connect/auth',
'urlAccessToken' => 'https://identity.ptl.api.platform.nhs.uk/realms/NHS-Login-mock-sandbox/protocol/openid-connect/token',
'scopes' => ['openid', 'profile'],
'urlResourceOwnerDetails' => ''
]);
Expand All @@ -52,7 +52,7 @@ public function callback(): Response {
// FILL THESE VARIABLES
// Please remove the extension from the file auth.
$key_path = '/app/auth.key';
$tokenUrl = 'https://identity.ptl.api.platform.nhs.uk/auth/realms/NHS-Login-mock-sandbox/protocol/openid-connect/token';
$tokenUrl = 'https://identity.ptl.api.platform.nhs.uk/realms/NHS-Login-mock-sandbox/protocol/openid-connect/token';
$clientId = 'hello-world-tutorials';

$APPPrivateKey_path = $_ENV['CLIENT_ID'];
Expand Down