How to integrate SSO with management api codeigniter

Hello, I have a applicaition currently i have successfully integrated database connection to autheticate user with email and password via management api, but for some of the users I need to use SSO for them with adfs or saml , I have adfs configuration and metadataxml but I am lost how to proceed ahead