SimpleSAML PHP integrate with my Own applications.

36 views
Skip to first unread message

Assi Rosdi

unread,
Dec 8, 2020, 4:14:10 AM12/8/20
to SimpleSAMLphp
Hi there, I need some help.

Here, I am trying to integrate my application with SimpleSAMLphp.

I have IdP configured and they're both working fine (I can test it on the simplesamlphp admin page, via "Test configured authentication sources")

But when I try to integrate with my application, after login in with an IdP and its successful , BUT after that, it direct display again login form of my page application. Suppose, should display dashboard of my application, and no need more force user to login twice.

Does anyone know, what should I do, about the session I'm still beginner in php.
I hope I can get help from you guys.

pat...@cirrusidentity.com

unread,
Dec 8, 2020, 2:29:09 PM12/8/20
to SimpleSAMLphp
How are you invoking the SSP api? Can you show a code snippet.
Is the Saml login initiated from a button on your login form?

Assi Rosdi

unread,
Dec 9, 2020, 12:24:13 AM12/9/20
to SimpleSAMLphp

Attached to you, the piece of code SSP api. Actually I put the SSP api at the top of my login page application.

Is the Saml login initiated from a button on your login form? No this one, I use third party Idp, from the idp login page, and will landing to my application. I use simplesamlphp as sp here.
Screenshot 2020-12-09 at 12.57.28 PM.png

Peter Schober

unread,
Dec 9, 2020, 4:56:23 AM12/9/20
to SimpleSAMLphp
* Assi Rosdi <asci...@gmail.com> [2020-12-08 10:14]:
> But when I try to integrate with my application, after login in with
> an IdP and its successful , BUT after that, it direct display again
> login form of my page application.

What did you do to avoid the login form of your application from being
shown once the subject has a local (to the SP) SSP session?
What did you do to create an application session from the SSP session?

Just slapping an SSO system in front of an unmodified application will
not magically SSO-enable the application itself.

-peter

pra...@gmail.com

unread,
Dec 14, 2020, 11:22:59 AM12/14/20
to SimpleSAMLphp
Your code snippet requires that the user authenticate and then simply processes/displays the rest of login.php.
If you look at the API documentation example (https://simplesamlphp.org/docs/stable/simplesamlphp-sp-api#section_3_3) you can see they use 'ReturnTo' to send the user to a specific url after authentication. You can also just redirect the user as you see fit elsewhere in login.php

As Peter mentioned, you still need to figure out your own app's session, how to enforce login throughout the app, etc.

- Patrick


Reply all
Reply to author
Forward
0 new messages