You are not supposed to use verysimple.php for authentication. It is an
example of how to access the authentication functions in simpleSAMLphp.
> Now at SP side i want to provide iframe url for authentication through
> IdP like :
> SP: http://www.mysp.com
> IdP: http://www.myidp.com
>
> authentication url now is: http://www.mysp.com/verysimple.php?login
> So on index page at SP site i want to integrate it like http://www.mysp.com/login
> I am going to use cakephp framework.
>
> Please tell me how can i do that
Create an endpoint in cakephp that received requests for "/login", and
that calls something like:
$as = new SimpleSAML_Auth_Source('default-sp');
$as->login(array('ReturnTo' => 'http://www.mysp.com/something'));
I do not know anything about cakephp, so I do not know what is required
to do this.
Also, in order for logout to work, you must also remember to check
whether the simpleSAMLphp session is still valid. The safest method is
to call the simpleSAMLphp functions where you need to know the username
(or any other information about the user). I.e.
$as = new SimpleSAML_Auth_Source('default-sp');
if ($as->isAuthenticated()) {
/* User is authenticated. */
$attributes = $as->getAttributes();
$username = $attributes['uid'][0]; // Or something like this, depending on the specific attributes you receive.
}
Best regards,
Olav Morken
UNINETT / Feide