Hi Sérgio,
I believe this component can help.
Have you already looked into it?
Also there is a course about authentication where you can find detailed info on SAML 2.0 here you can see how to configure it in the right way, I understand that you would not need to make external calls.
If you want to use a custom API for instance I believe you have to develop your own logic and authentication with tokens and etc
Hello Raphael..