From e5aabe6168e549d47d3a195bc294ff9710fbf7de Mon Sep 17 00:00:00 2001 From: Jade Koskela Date: Fri, 11 Aug 2023 11:54:10 -0700 Subject: [PATCH 1/2] Update/add OAuth example callbacks --- samples/components/oauth/athena.okta.xml | 8 +- samples/components/oauth/redshift.azure.xml | 130 ++++++++++---------- 2 files changed, 72 insertions(+), 66 deletions(-) diff --git a/samples/components/oauth/athena.okta.xml b/samples/components/oauth/athena.okta.xml index 9673e78e..cab346f6 100644 --- a/samples/components/oauth/athena.okta.xml +++ b/samples/components/oauth/athena.okta.xml @@ -1,11 +1,13 @@ + athena custom_athena_okta $clientID $clientSecret - http://localhost:56666/Callback - http://localhost:56667/Callback - http://localhost:56668/Callback + http://localhost:55556/Callback + http://localhost:55557/Callback + http://localhost:55558/Callback + http://localhost:55559/Callback https://${oktaDomain}/oauth2/v1/authorize https://${oktaDomain}/oauth2/v1/token openid diff --git a/samples/components/oauth/redshift.azure.xml b/samples/components/oauth/redshift.azure.xml index f38ff93b..37b1e2d4 100644 --- a/samples/components/oauth/redshift.azure.xml +++ b/samples/components/oauth/redshift.azure.xml @@ -1,63 +1,67 @@ - - - redshift - custom_redshift_azure - $clientID - $clientSecret - https://${msUrlBegin}/oauth2/v2.0/authorize - https://${msUrlBegin}/oauth2/v2.0/token - openid - email - profile - offline_access - - - - OAUTH_CAP_REQUIRES_PROMPT_SELECT_ACCOUNT - true - - - OAUTH_CAP_REQUIRE_PKCE - true - - - OAUTH_CAP_PKCE_REQUIRES_CODE_CHALLENGE_METHOD - true - - - OAUTH_CAP_CLIENT_SECRET_IN_URL_QUERY_PARAM - true - - - OAUTH_CAP_SUPPORTS_GET_USERINFO_FROM_ID_TOKEN - true - - - - - ACCESSTOKEN - access_token - - - REFRESHTOKEN - refresh_token - - - access-token-issue-time - issued_at - - - access-token-expires-in - expires_in - - - id-token - id_token - - - username - preferred_username - - - - + + + redshift + custom_redshift_azure + $clientID + $clientSecret + http://localhost:55556/Callback + http://localhost:55557/Callback + http://localhost:55558/Callback + http://localhost:55559/Callback + https://${msUrlBegin}/oauth2/v2.0/authorize + https://${msUrlBegin}/oauth2/v2.0/token + openid + email + profile + offline_access + + + + OAUTH_CAP_REQUIRES_PROMPT_SELECT_ACCOUNT + true + + + OAUTH_CAP_REQUIRE_PKCE + true + + + OAUTH_CAP_PKCE_REQUIRES_CODE_CHALLENGE_METHOD + true + + + OAUTH_CAP_CLIENT_SECRET_IN_URL_QUERY_PARAM + true + + + OAUTH_CAP_SUPPORTS_GET_USERINFO_FROM_ID_TOKEN + true + + + + + ACCESSTOKEN + access_token + + + REFRESHTOKEN + refresh_token + + + access-token-issue-time + issued_at + + + access-token-expires-in + expires_in + + + id-token + id_token + + + username + preferred_username + + + + From b4532066f137e445aab5ee2af9342e95bcadfa9b Mon Sep 17 00:00:00 2001 From: Jade Koskela Date: Fri, 11 Aug 2023 12:21:11 -0700 Subject: [PATCH 2/2] Add README --- samples/components/oauth/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 samples/components/oauth/README.md diff --git a/samples/components/oauth/README.md b/samples/components/oauth/README.md new file mode 100644 index 00000000..45a110f6 --- /dev/null +++ b/samples/components/oauth/README.md @@ -0,0 +1,8 @@ +# OAuth Config Templates + +For these templates, if you are using the corresponding IDP, you should only have to substitute the following: +- Desktop client ID +- Desktop client Secret +- IDP URL prefix/domain name + +See the [OAuth](https://tableau.github.io/connector-plugin-sdk/docs/oauth) section in the SDK docs for more information. \ No newline at end of file