'( WSO2 AM 4.1 : Token Endpoint ) Can we use the gateway as the default token Endpoint?

in new wso2 apim versions (4.0/4.1) the default token endpoint has changed . It used to be the Gateway : https://gw.wso2.com/oauth2/token and the the call is redirected to the key manager node . Now with the news versions , we do not need to go trough that process as we can directly call the key-manager for token operations .

is there a way to preseve the same behavior of the old versions in the new version 4.1 ?

For now, I tried adding the TokenAPI.xml api in the synapse-configs to see if i can produce the same experience , but the api is automatically destroyed in startup.

Any ideas ?

Thank you in advance .

Best regards,



Solution 1:[1]

Yes, the gateway removes those files.

To keep custom runtime artifacts deployed in the Gateway, add the following configuration in the /repository/conf/deployment.toml file.

[apim.sync_runtime_artifacts.gateway.skip_list]
apis = ["token_api_file_name.xml"]

Refer - https://apim.docs.wso2.com/en/latest/install-and-setup/setup/distributed-deployment/deploying-wso2-api-m-in-a-distributed-setup/#configure-the-gateway-nodes

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pubci