I have a Zend project where users login through a login page backed by a database. I have implemented IdP initiated SSO functionality using simplesamlphp.
Current flow of the events is :-
- User login into my website.
- Clicks on the IDP initiated SSO link.
- User is redirected to the login page I created for SSO login handling. ( Ideally it should happen if user is not logged in. )
- After login user is sent to the required IDP.
- After printing $_SESSION here and there I found that this is happening because proper session variables for simplesamlphp is not set.
What I want simplesaml to do is following :-
- User login into to my website.
- User click on IdP initiated SSO link.
- User is redirected to the service provider.
But I am unable to find any method to do so. Please help.
To solve this, I initiated the simplesaml session before making user login using
After this I stored the user's login credentials on the session. I don't know if this is the best way to solve this.