您可以通过以下步骤设置WSO2 APIM开发门户应用程序设置:
1.登录WSO2 APIM管理控制台。
2.转到“API门户”部分,然后单击“设置”。
3.单击“自定义应用程序”选项卡,并输入您的应用程序名称,例如“DevPortal”。
4.在“回调URL”中输入您的应用程序URL。
5.选择OAuth2区域类型,输入应用程序客户端密钥和密钥。
6.将端点URL设置为您的应用程序URL。
7.单击“保存”。
代码示例:
<APIGateway>
<Environments>
<Environment type="hybrid" api-console="true">
<Name>Production and Sandbox</Name>
<Description>This is a hybrid gateway that handles both production and sandbox token traffic.</Description>
<ServerURL>https://localhost:9443,https://localhost:10443</ServerURL>
<Username>${admin.username}</Username>
<Password>${admin.password}</Password>
<GatewayEndpoint>http://localhost:8280</GatewayEndpoint>
<GatewayWSEndpoint>ws://localhost:9099</GatewayWSEndpoint>
<Transport>https</Transport>
<SecuredEndpoint>https://localhost:8243</SecuredEndpoint>
</Environment>
</Environments>
</APIGateway>