SAML: transport url parameter in IDP choice screens (closes #73)
This commit is contained in:
parent
62d9cccaa0
commit
b8c3f5e6ff
@ -729,6 +729,10 @@ sub extractFormInfo {
|
|||||||
if ( $confirm_flag == -1 or !$idp ) {
|
if ( $confirm_flag == -1 or !$idp ) {
|
||||||
$self->lmLog( "No IDP found, redirecting user to IDP list", 'debug' );
|
$self->lmLog( "No IDP found, redirecting user to IDP list", 'debug' );
|
||||||
|
|
||||||
|
# Control url parameter
|
||||||
|
my $urlcheck = $self->controlUrlOrigin();
|
||||||
|
return $urlcheck unless ( $urlcheck == PE_OK );
|
||||||
|
|
||||||
# IDP list
|
# IDP list
|
||||||
my $html = "<h3>"
|
my $html = "<h3>"
|
||||||
. &Lemonldap::NG::Portal::_i18n::msg( PM_SAML_IDPSELECT,
|
. &Lemonldap::NG::Portal::_i18n::msg( PM_SAML_IDPSELECT,
|
||||||
@ -750,6 +754,10 @@ sub extractFormInfo {
|
|||||||
$ENV{HTTP_ACCEPT_LANGUAGE} )
|
$ENV{HTTP_ACCEPT_LANGUAGE} )
|
||||||
. "</td></tr></table>\n"
|
. "</td></tr></table>\n"
|
||||||
|
|
||||||
|
# URL
|
||||||
|
. '<input type="hidden" name="url" value="'
|
||||||
|
. $self->param("url") . '" />'
|
||||||
|
|
||||||
# Script to autoselect first choice
|
# Script to autoselect first choice
|
||||||
. '<script>$("[type=radio]:first").attr("checked","checked");</script>';
|
. '<script>$("[type=radio]:first").attr("checked","checked");</script>';
|
||||||
|
|
||||||
@ -773,6 +781,10 @@ sub extractFormInfo {
|
|||||||
elsif ( $confirm_flag != 1 ) {
|
elsif ( $confirm_flag != 1 ) {
|
||||||
$self->lmLog( "IDP $idp selected, need user confirmation", 'debug' );
|
$self->lmLog( "IDP $idp selected, need user confirmation", 'debug' );
|
||||||
|
|
||||||
|
# Control url parameter
|
||||||
|
my $urlcheck = $self->controlUrlOrigin();
|
||||||
|
return $urlcheck unless ( $urlcheck == PE_OK );
|
||||||
|
|
||||||
# Choosen IDP
|
# Choosen IDP
|
||||||
my $html = '<h3>'
|
my $html = '<h3>'
|
||||||
. &Lemonldap::NG::Portal::_i18n::msg( PM_SAML_IDPCHOOSEN,
|
. &Lemonldap::NG::Portal::_i18n::msg( PM_SAML_IDPCHOOSEN,
|
||||||
@ -783,6 +795,8 @@ sub extractFormInfo {
|
|||||||
. "<p><i>"
|
. "<p><i>"
|
||||||
. $idp
|
. $idp
|
||||||
. "</i></p>\n"
|
. "</i></p>\n"
|
||||||
|
. "<input type=\"hidden\" name=\"url\" value=\""
|
||||||
|
. $self->param("url") . "\" />"
|
||||||
. "<input type=\"hidden\" name=\"idp\" value=\"$idp\" />\n";
|
. "<input type=\"hidden\" name=\"idp\" value=\"$idp\" />\n";
|
||||||
|
|
||||||
$self->info($html);
|
$self->info($html);
|
||||||
@ -794,6 +808,10 @@ sub extractFormInfo {
|
|||||||
unless ( $idp_cookie and ( $idp eq $idp_cookie->value ) ) {
|
unless ( $idp_cookie and ( $idp eq $idp_cookie->value ) ) {
|
||||||
$self->lmLog( "Build cookie to remember $idp as IDP choice", 'debug' );
|
$self->lmLog( "Build cookie to remember $idp as IDP choice", 'debug' );
|
||||||
|
|
||||||
|
# Control url parameter
|
||||||
|
my $urlcheck = $self->controlUrlOrigin();
|
||||||
|
return $urlcheck unless ( $urlcheck == PE_OK );
|
||||||
|
|
||||||
# User can choose temporary (0) or persistent cookie (1)
|
# User can choose temporary (0) or persistent cookie (1)
|
||||||
my $cookie_type = $self->param("cookie_type") || "0";
|
my $cookie_type = $self->param("cookie_type") || "0";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user