#How can I set up an OAuth2 token endpoint
1 messages · Page 1 of 1 (latest)
Hi @jade hearth, regarding the tokenUrl(https://localhost:9445/oauth2/token): make sure to use the URL configured from the authorization server/IdP. You have the flexibility to choose any IdP that supports ClientCredential grant type. To configure a WSO2 Identity Server, you can refer to this link: https://is.docs.wso2.com/en/6.0.0/guides/access-delegation/client-credentials-playground/. Alternatively, you can explore the client credential grant type in Asgardeo by visiting: https://wso2.com/asgardeo/docs/references/grant-types-in-asgardeo/#refresh-token-grant.
@tired sage I think it would be good if we can include an example in the OAuth2 module repo. WDYT?
@opal anchor we already have an example scenario covering how to configure a ballerina client: https://github.com/ballerina-platform/module-ballerina-oauth2/tree/master/examples/order-management-service. But this doesn't discuss much about how to configure an IdP. Yes, we could consider adding an example with WSO2 IS/ Asgardeo.
Yes, I was thinking an example with an IDP. We can use either IS or Asgardeo. (I think we already have an STS implementation using WSO2 IS which is used for testing purposes. We may add that to an example?)
Created an issue to track this: https://github.com/ballerina-platform/ballerina-standard-library/issues/4497