plp050452 / simplesamlphp

Automatically exported from code.google.com/p/simplesamlphp
Other
0 stars 0 forks source link

Add Selected Organization to State #457

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This patch simply adds the organization that the user selected to the state 
data.

It's been bugging me that I don't know in the ldap:BaseFilter to get those 
specific config options. With this patch, I just need to figure out how to get 
the state data in the filter constructor. Ideas? I dug through the source all 
afternoon to track where the state is at but it looks to complex to pass with 
the filter config or loadState.

Thanks again.

Original issue reported on code.google.com by pan...@traileyes.com on 21 Nov 2011 at 10:11

Attachments:

GoogleCodeExporter commented 8 years ago
In addition to storing this field in the $state array, you will probably also 
want to add the field name to the 'PersistentAuthData'-field, so that it is 
saved for future authentication requests. Something like:

    $state['PersistentAuthData'][] = self::ORGID;

Original comment by olavmrk@gmail.com on 22 Nov 2011 at 8:10

GoogleCodeExporter commented 8 years ago
Attached is a new patch with that addition. Should I be doing that whenever I 
add stuff to the $state or $request in a filter? I save state to redirect to a 
new page.

Original comment by pan...@traileyes.com on 23 Nov 2011 at 3:58

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! Committed as r2992.

Original comment by olavmrk@gmail.com on 2 Dec 2011 at 10:48

GoogleCodeExporter commented 8 years ago
I just realized that I forgot to answer your question:

You only need to add an entry to the PersistentAuthData array if you need it to 
be saved for use in authentication processing filters. Everything is kept in 
the state array through the login process, but in SSO scenarios (where the user 
is already authenticated), only the data that has been marked as persistent 
will be available to the processing filters.

Original comment by olavmrk@gmail.com on 2 Dec 2011 at 11:03