針對 ThingWorx 建立 OAuth 用戶端連線
此用戶端是 PingFederateThingWorx 提供存取權杖時所用的連線點。ThingWorx 會接著使用這些存取權杖來從資源提供者請求受 OAuth 保護的資源。欲針對作為服務提供者的 ThingWorx 建立及配置 OAuth 用戶端,請完成下列步驟:
1. OAuth Server 頁中找出 Clients 部份,然後按一下 Create New
2. Client ID 中輸入內容。這將會用來作為 AuthorizationServerSettings.<AuthServerId>.clientId 設定 (在配置 ThingWorx sso-settings.json 檔案時)。
3. 選取 Client Secret,然後輸入用戶端密碼值。請記下此值,因為它將會用於 AuthorizationServerSettings.<AuthServerId>.clientSecret 設定 (在配置 ThingWorx sso-settings.json 檔案時)。
4. Name 欄位中,輸入具描述性的值。它會顯示在 PingFederate 用戶端清單中。
5. Description 中輸入內容。
6. Redirect URIS 部份,輸入您的 ThingWorx 伺服器重新導向 URI。這會類似於 http 或 https://<myserver>:<myport>/Thingworx/oauth2_authorization_code_redirect<myserver> 的值是您 ThingWorx 伺服器的 FQDN。
* 
如果您已將 ThingWorx 配置為在高可用性 (HA) 環境下運作,請將此值指定為 http://<負載平衡器伺服器>:<負載平衡器埠>/Thingworx/oauth2_authorization_code_redirect
如果您已在您要針對 SSO 配置的 ThingWorx 實例上安裝 ThingWorx Flow,請將此值指定為 https://<ThingWorx Flow Nginx host-name>:<ThingWorx Flow Nginx port-number>/Thingworx/oauth2_authorization_code_redirect
如果 ThingWorx Flow 使用 OAuth 連接器,例如使用 Windchill 作為資源提供者或使用 ThingWorx 作為資源提供者,則您也必須提供 OAuth 重新導向 URI 為 https://<ThingWorx Flow Nginx host-name>:<ThingWorx Flow Nginx port-number>/Thingworx/Oauths/oauth/return
7. Allow Grant Types 部份,選取 Refresh TokenAuthorization CodeAccess Token Validation (Client is a Resource Server)
8. Persistent Grants Expiration 部份,選取 Grants Do Not Expire
9. Refresh Token Rolling Policy 設定中,選取 Roll
這是否有幫助?