From cd115841e2e0d3b2548262aef63b517d1113f8a3 Mon Sep 17 00:00:00 2001 From: Austin Canada Date: Mon, 15 Apr 2024 16:46:52 -0400 Subject: [PATCH 1/3] BCDA-7973: Add loading for Try The API creds Add "dynamic" loading for Try The API code snippets. Puts test credentials into YML file which can be used for the rest of the codebase or other credentials. --- _data/credentials.yml | 15 +++++++++++++++ _includes/guide/credentials.html | 20 ++++++++++---------- _includes/guide/try_the_api.html | 4 ++-- 3 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 _data/credentials.yml diff --git a/_data/credentials.yml b/_data/credentials.yml new file mode 100644 index 0000000..5f6cd03 --- /dev/null +++ b/_data/credentials.yml @@ -0,0 +1,15 @@ +extra_small: + client_id: "3841c594-a8c0-41e5-98cc-38bb45360d3c" + client_secret: "efef20edc106b7b355ff09754d5b19014f42820996629a469aa3d4ce1063cbd098b08ccba3bbdcbf" +small: + client_id: "d5f83f74-6c55-4f1e-9d16-0022688171ba" + client_secret: "e7a56d9e54dadaae1c0effde59ae1c804088cb4287f7f9fd5de6de0e3399923a59b5ad37a38dab7a" +medium: + client_id: "8c75a6f6-02b9-4a47-96c1-0bd6efd4b5e3" + client_secret: "283e10b42cfb7de88bdf7ebd5d4f178ba6af19b6eadfbc36675754a1576c899435bb098dd97aa8b0" +large: + client_id: "f268a8c6-8a29-4d2b-8b92-263dc775750d" + client_secret: "1087acf26be69e26d4ab5f8078d63cb737f3dd9aeedb928c463dd72d7b111191de16b484428d8d8f" +extra_large: + client_id: "6152afb4-c555-46e4-93de-fa16a441d643" + client_secret: "7c312fbe1fafaf4fab3e4a71c20bb79106a083a24784ef83dc56a2b1f891a9f52b181a20eec698a0" \ No newline at end of file diff --git a/_includes/guide/credentials.html b/_includes/guide/credentials.html index 033d9c7..949bda2 100644 --- a/_includes/guide/credentials.html +++ b/_includes/guide/credentials.html @@ -2,14 +2,14 @@
Client ID: {%- capture client_id -%} - 3841c594-a8c0-41e5-98cc-38bb45360d3c + {{site.data.credentials.extra_small.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Extra-Small ACO (50 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - efef20edc106b7b355ff09754d5b19014f42820996629a469aa3d4ce1063cbd098b08ccba3bbdcbf + {{site.data.credentials.extra_small.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Extra-Small ACO (50 synthetic beneficiaries)' type='Client Secret' %} @@ -19,14 +19,14 @@
Client ID: {%- capture client_id -%} - d5f83f74-6c55-4f1e-9d16-0022688171ba + {{site.data.credentials.small.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Small ACO (2,500 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - e7a56d9e54dadaae1c0effde59ae1c804088cb4287f7f9fd5de6de0e3399923a59b5ad37a38dab7a + {{site.data.credentials.small.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Small ACO (2,500 synthetic beneficiaries)' type='Client Secret' %} @@ -36,14 +36,14 @@
Client ID: {%- capture client_id -%} - 8c75a6f6-02b9-4a47-96c1-0bd6efd4b5e3 + {{site.data.credentials.medium.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Medium ACO (7,500 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - 283e10b42cfb7de88bdf7ebd5d4f178ba6af19b6eadfbc36675754a1576c899435bb098dd97aa8b0 + {{site.data.credentials.medium.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Medium ACO (7,500 synthetic beneficiaries)' type='Client Secret' %} @@ -53,14 +53,14 @@
Client ID: {%- capture client_id -%} - f268a8c6-8a29-4d2b-8b92-263dc775750d + {{site.data.credentials.large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Large ACO (20,000 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - 1087acf26be69e26d4ab5f8078d63cb737f3dd9aeedb928c463dd72d7b111191de16b484428d8d8f + {{site.data.credentials.large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Large ACO (20,000 synthetic beneficiaries)' type='Client Secret' %} @@ -70,14 +70,14 @@
Client ID: {%- capture client_id -%} - 6152afb4-c555-46e4-93de-fa16a441d643 + {{site.data.credentials.extra_large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Extra-Large ACO (30,000 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - 7c312fbe1fafaf4fab3e4a71c20bb79106a083a24784ef83dc56a2b1f891a9f52b181a20eec698a0 + {{site.data.credentials.extra_large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Extra-Large ACO (30,000 synthetic beneficiaries)' type='Client Secret' %} diff --git a/_includes/guide/try_the_api.html b/_includes/guide/try_the_api.html index 226d78b..dd1dab6 100644 --- a/_includes/guide/try_the_api.html +++ b/_includes/guide/try_the_api.html @@ -65,7 +65,7 @@

For this demonstration, we will provide sample API credentials to the sandbox environment. We will be using the sample - credentials for an Extra-Small Model Entity (25 beneficiaries). Feel free to follow along with any of the sample credentials. + credentials for an Extra-Small Model Entity (50 beneficiaries). Feel free to follow along with any of the sample credentials.

Our credentials come in two pieces: a Client ID and a Client Secret. We will submit these two pieces to the API. Notice that the credentials are included in one of the headers (--user). You must use this format: --user {insert client id}{insert colon}{insert client secret}. @@ -74,7 +74,7 @@

Sample cURL Command to Submit Credentials for an Access Token

curl -d '' -X POST 'https://sandbox.bcda.cms.gov/auth/token' \
-	--user 2462c96b-6427-4efb-aed7-118e20c2e997:8e87f0ebc50d10f1bc9734329a9900179b84ccd39e4d0920b905cc359cf6e94a6e760bbe3a0890c7 \
+	--user {{site.data.credentials.extra_small.client_id}}:{{site.data.credentials.extra_small.client_secret}} \
 	-H "accept: application/json"

From 3d1dd2ca3ce175cf0553c250b54671b83ea3d78e Mon Sep 17 00:00:00 2001 From: Austin Canada Date: Tue, 16 Apr 2024 12:37:13 -0400 Subject: [PATCH 2/3] BCDA-7973: Fix client secrets not showing Fixes a problem where client secrets weren't being loaded. --- _includes/guide/credentials.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_includes/guide/credentials.html b/_includes/guide/credentials.html index 949bda2..e4a1fb6 100644 --- a/_includes/guide/credentials.html +++ b/_includes/guide/credentials.html @@ -26,7 +26,7 @@ Client Secret: {%- capture client_secret -%} - {{site.data.credentials.small.client_id}} + {{site.data.credentials.small.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Small ACO (2,500 synthetic beneficiaries)' type='Client Secret' %} @@ -43,7 +43,7 @@ Client Secret: {%- capture client_secret -%} - {{site.data.credentials.medium.client_id}} + {{site.data.credentials.medium.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Medium ACO (7,500 synthetic beneficiaries)' type='Client Secret' %} @@ -60,7 +60,7 @@ Client Secret: {%- capture client_secret -%} - {{site.data.credentials.large.client_id}} + {{site.data.credentials.large.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Large ACO (20,000 synthetic beneficiaries)' type='Client Secret' %} @@ -77,7 +77,7 @@ Client Secret: {%- capture client_secret -%} - {{site.data.credentials.extra_large.client_id}} + {{site.data.credentials.extra_large.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Extra-Large ACO (30,000 synthetic beneficiaries)' type='Client Secret' %} From 5b1540f88b7f05b2e20a88f02a3743c839625277 Mon Sep 17 00:00:00 2001 From: Austin Canada Date: Wed, 17 Apr 2024 16:53:59 -0400 Subject: [PATCH 3/3] BCDA-7973: Make all credentials load dynamically Adds all of the credentials to the YML file in order to load them dynamically. --- _data/credentials.yml | 45 ++++++++++++------- _includes/guide/adv_credentials.html | 8 ++-- .../guide/bcda_enhancement_credentials.html | 8 ++-- _includes/guide/credentials.html | 20 ++++----- 4 files changed, 48 insertions(+), 33 deletions(-) diff --git a/_data/credentials.yml b/_data/credentials.yml index 5f6cd03..4d2a517 100644 --- a/_data/credentials.yml +++ b/_data/credentials.yml @@ -1,15 +1,30 @@ -extra_small: - client_id: "3841c594-a8c0-41e5-98cc-38bb45360d3c" - client_secret: "efef20edc106b7b355ff09754d5b19014f42820996629a469aa3d4ce1063cbd098b08ccba3bbdcbf" -small: - client_id: "d5f83f74-6c55-4f1e-9d16-0022688171ba" - client_secret: "e7a56d9e54dadaae1c0effde59ae1c804088cb4287f7f9fd5de6de0e3399923a59b5ad37a38dab7a" -medium: - client_id: "8c75a6f6-02b9-4a47-96c1-0bd6efd4b5e3" - client_secret: "283e10b42cfb7de88bdf7ebd5d4f178ba6af19b6eadfbc36675754a1576c899435bb098dd97aa8b0" -large: - client_id: "f268a8c6-8a29-4d2b-8b92-263dc775750d" - client_secret: "1087acf26be69e26d4ab5f8078d63cb737f3dd9aeedb928c463dd72d7b111191de16b484428d8d8f" -extra_large: - client_id: "6152afb4-c555-46e4-93de-fa16a441d643" - client_secret: "7c312fbe1fafaf4fab3e4a71c20bb79106a083a24784ef83dc56a2b1f891a9f52b181a20eec698a0" \ No newline at end of file +sandbox: + extra_small: + client_id: "3841c594-a8c0-41e5-98cc-38bb45360d3c" + client_secret: "efef20edc106b7b355ff09754d5b19014f42820996629a469aa3d4ce1063cbd098b08ccba3bbdcbf" + small: + client_id: "d5f83f74-6c55-4f1e-9d16-0022688171ba" + client_secret: "e7a56d9e54dadaae1c0effde59ae1c804088cb4287f7f9fd5de6de0e3399923a59b5ad37a38dab7a" + medium: + client_id: "8c75a6f6-02b9-4a47-96c1-0bd6efd4b5e3" + client_secret: "283e10b42cfb7de88bdf7ebd5d4f178ba6af19b6eadfbc36675754a1576c899435bb098dd97aa8b0" + large: + client_id: "f268a8c6-8a29-4d2b-8b92-263dc775750d" + client_secret: "1087acf26be69e26d4ab5f8078d63cb737f3dd9aeedb928c463dd72d7b111191de16b484428d8d8f" + extra_large: + client_id: "6152afb4-c555-46e4-93de-fa16a441d643" + client_secret: "7c312fbe1fafaf4fab3e4a71c20bb79106a083a24784ef83dc56a2b1f891a9f52b181a20eec698a0" +adv: + small: + client_id: "6dc59a4c-ef93-46c0-9c00-02e500e13731" + client_secret: "317a7e3d11d617931ef9c39a2e5c34747f4349cde2b3ec7355f5b01d6c8e19aefca45483966e5f63" + large: + client_id: "69b1ecae-750a-479b-9997-eb38b1197adb" + client_secret: "3611796c42ee5ee92fae59b66c50f48ab0e40f2bc331e9429d7b10413f232b0477939a9aa6148748" +enhancement: + small: + client_id: "d6975f99-d83e-4eee-9a54-c057be12d1ff" + client_secret: "56b4057a56d0c83657757e97aef63f4f163d64caad2950cd324ed346dbeffa1ed02a6a3d4d92b116" + large: + client_id: "1f4575c9-80ea-425c-9d3e-c2b79e9159da" + client_secret: "10d824c77f7f00aad9c8cab420244f1008ec08d68eb194818c01e504586db84c6184ea89079cdeef" diff --git a/_includes/guide/adv_credentials.html b/_includes/guide/adv_credentials.html index e0be01f..0b89bbd 100644 --- a/_includes/guide/adv_credentials.html +++ b/_includes/guide/adv_credentials.html @@ -2,14 +2,14 @@
Client ID: {%- capture client_id -%} - 6dc59a4c-ef93-46c0-9c00-02e500e13731 + {{site.data.credentials.adv.small.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Small Advanced ACO (100 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - 317a7e3d11d617931ef9c39a2e5c34747f4349cde2b3ec7355f5b01d6c8e19aefca45483966e5f63 + {{site.data.credentials.adv.small.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Small Advanced ACO (100 synthetic beneficiaries)' type='Client Secret' %} @@ -19,14 +19,14 @@
Client ID: {%- capture client_id -%} - 69b1ecae-750a-479b-9997-eb38b1197adb + {{site.data.credentials.adv.large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Large Advanced ACO (10,000 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - 3611796c42ee5ee92fae59b66c50f48ab0e40f2bc331e9429d7b10413f232b0477939a9aa6148748 + {{site.data.credentials.adv.large.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Large Advanced ACO (10,000 synthetic beneficiaries)' type='Client Secret' %} diff --git a/_includes/guide/bcda_enhancement_credentials.html b/_includes/guide/bcda_enhancement_credentials.html index 8ee7baf..328f8c4 100644 --- a/_includes/guide/bcda_enhancement_credentials.html +++ b/_includes/guide/bcda_enhancement_credentials.html @@ -2,14 +2,14 @@
Client ID: {%- capture client_id -%} - d6975f99-d83e-4eee-9a54-c057be12d1ff + {{site.data.credentials.enhancement.small.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Small REACH ACO (100 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - 56b4057a56d0c83657757e97aef63f4f163d64caad2950cd324ed346dbeffa1ed02a6a3d4d92b116 + {{site.data.credentials.enhancement.small.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Small REACH ACO (100 synthetic beneficiaries)' type='Client Secret' %} @@ -19,14 +19,14 @@
Client ID: {%- capture client_id -%} - 1f4575c9-80ea-425c-9d3e-c2b79e9159da + {{site.data.credentials.enhancement.large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Large DCE (10,000 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - 10d824c77f7f00aad9c8cab420244f1008ec08d68eb194818c01e504586db84c6184ea89079cdeef + {{site.data.credentials.enhancement.large.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Large DCE (10,000 synthetic beneficiaries)' type='Client Secret' %} diff --git a/_includes/guide/credentials.html b/_includes/guide/credentials.html index e4a1fb6..4e251b4 100644 --- a/_includes/guide/credentials.html +++ b/_includes/guide/credentials.html @@ -2,14 +2,14 @@
Client ID: {%- capture client_id -%} - {{site.data.credentials.extra_small.client_id}} + {{site.data.credentials.sandbox.extra_small.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Extra-Small ACO (50 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - {{site.data.credentials.extra_small.client_secret}} + {{site.data.credentials.sandbox.extra_small.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Extra-Small ACO (50 synthetic beneficiaries)' type='Client Secret' %} @@ -19,14 +19,14 @@
Client ID: {%- capture client_id -%} - {{site.data.credentials.small.client_id}} + {{site.data.credentials.sandbox.small.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Small ACO (2,500 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - {{site.data.credentials.small.client_secret}} + {{site.data.credentials.sandbox.small.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Small ACO (2,500 synthetic beneficiaries)' type='Client Secret' %} @@ -36,14 +36,14 @@
Client ID: {%- capture client_id -%} - {{site.data.credentials.medium.client_id}} + {{site.data.credentials.sandbox.medium.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Medium ACO (7,500 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - {{site.data.credentials.medium.client_secret}} + {{site.data.credentials.sandbox.medium.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Medium ACO (7,500 synthetic beneficiaries)' type='Client Secret' %} @@ -53,14 +53,14 @@
Client ID: {%- capture client_id -%} - {{site.data.credentials.large.client_id}} + {{site.data.credentials.sandbox.large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Large ACO (20,000 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - {{site.data.credentials.large.client_secret}} + {{site.data.credentials.sandbox.large.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Large ACO (20,000 synthetic beneficiaries)' type='Client Secret' %} @@ -70,14 +70,14 @@
Client ID: {%- capture client_id -%} - {{site.data.credentials.extra_large.client_id}} + {{site.data.credentials.sandbox.extra_large.client_id}} {%- endcapture -%} {% include copy_snippet.md code=client_id aco='Extra-Large ACO (30,000 synthetic beneficiaries)' type='Client ID' %} Client Secret: {%- capture client_secret -%} - {{site.data.credentials.extra_large.client_secret}} + {{site.data.credentials.sandbox.extra_large.client_secret}} {%- endcapture -%} {% include copy_snippet.md code=client_secret aco='Extra-Large ACO (30,000 synthetic beneficiaries)' type='Client Secret' %}