php - Trouble Understanding the ReturnTo Redirect for SimpleSAMLphp -


trying set redirect in simplesamlphp take user page trying access before being sent authentication.

i'm using returnto option:

$as->requireauth(array("returnto" => $returnurl, 'keeppost' => false)); 

with metadata remote-idp set (stripped example):

$metadata['sample'] = array(   'name' => 'sample',   'entityid' => 'https://sample.com/saml/module.php/saml/sp/metadata.php/sample',   'metadata-set' => 'saml20-idp-remote',   'singlesignonservice' =>        array (         0 =>              array (               'binding' => 'urn:oasis:names:tc:saml:2.0:bindings:http-redirect',               'location' => 'https://sample:port/idp/startsso.ping?partnerspid=https://sample.com/saml/module.php/saml/sp/metadata.php/sample'             )       ),   'keys' => array(...) ); 

i need pass parameter "target" idp startsso in above metadata, haven't been able find how translate "returnto" option added onto sso url. i've captured/examined saml redirect xml, , returnto not in there @ all. know how this?

trying set redirect in simplesamlphp take user page trying access before being sent authentication.

using returnto method without option defaults redirect page user tried access.

from documentation

returnto (string)
url user should returned after authentication. default return user current page.

just include code in pages requiring authentication.

require_once 'path/to/simplesamlphp/lib/_autoload.php';  $as = new simplesaml_auth_simple('default-sp'); $as->requireauth(); 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -