Hi Tanu,
You can visit to this documentation, maybe here you find, what you are looking for:
https://docs.mendix.com/howto9/security/best-practices-security/#custom
I hope this resolves your query,
Please check:
https://docs.mendix.com/appstore/modules/oidc/#api-authentication