Custom Token Exchange Provider not working

Hi team, I need your support on the below

As part of OAuth2.0 Token Exchange API flow, I’ve implemented a custom token exchange provider by implementing TokenExchangeProvider.

Also, enabled my custom provider and disabled “default “ provider with the below commands. However, for some reason my custom provider is not getting triggered.

It would be helpful if someone suggest or guide me in resolving this issue.

kc.bat build --spi-token-exchange-provider--enabled=true --spi-token-exchange-provider-default-enabled=false

Update:

I’ve found and cracked it on my own after numerous attempts.

Issue:
The config params names were incorrect which caused the issue.

Solution:

The token exchange provider is part of OAuth2, and here are the parameters that are currently in use:
• --spi-oauth2-token-exchange-custom-provider-d-enabled=true // enables the custom token exchange provider
• --spi-oauth2-token-exchange-default-enabled=false // disables the default token exchange provider

Additionally, it’s important to note that the execution depends on the order value of the token exchange provider. If you do not specify a custom value, it defaults to ‘0’. It would be best to assign a lower value for a higher order and a higher value for a lower order.