Move SAML HTML fragments to tpl (#1302)
This commit is contained in:
parent
7e29c51c61
commit
91af1f63ff
|
@ -284,6 +284,9 @@ site/templates/bootstrap/redirect.tpl
|
|||
site/templates/bootstrap/register.tpl
|
||||
site/templates/bootstrap/removeOther.tpl
|
||||
site/templates/bootstrap/samlRedirectToIdp.tpl
|
||||
site/templates/bootstrap/samlSpLogout.tpl
|
||||
site/templates/bootstrap/samlSpsLogout.tpl
|
||||
site/templates/bootstrap/samlSpSoapLogout.tpl
|
||||
site/templates/bootstrap/sessionArray.tpl
|
||||
site/templates/bootstrap/simpleInfo.tpl
|
||||
site/templates/bootstrap/sslform.tpl
|
||||
|
|
|
@ -2517,12 +2517,14 @@ sub sendLogoutRequestToProvider {
|
|||
# Redirect user to response URL
|
||||
my $slo_url = $logout->msg_url;
|
||||
|
||||
$info .=
|
||||
qq'<tr><td><iframe src="$slo_url" alt="" marginwidth="0"'
|
||||
. ' marginheight="0" scrolling="no" class="noborder"'
|
||||
. ' width="10px" height="10px" frameborder="0">'
|
||||
. qq'</iframe></td><td>$providerName</td></tr>';
|
||||
|
||||
# Create iFrame
|
||||
$info .= $self->loadTemplate(
|
||||
'samlSpLogout',
|
||||
params => {
|
||||
url => $slo_url,
|
||||
name => $providerName,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
# HTTP-POST
|
||||
|
@ -2548,12 +2550,13 @@ sub sendLogoutRequestToProvider {
|
|||
my $slo_url = $portal . '/saml/relaySingleLogoutPOST?relay=' . $relayID;
|
||||
|
||||
# Create iFrame
|
||||
$info .=
|
||||
qq'<tr><td><iframe src="$slo_url" alt="" marginwidth="0"'
|
||||
. ' marginheight="0" scrolling="no" class="noborder"'
|
||||
. ' width="10px" height="10px" frameborder="0">'
|
||||
. qq'</iframe></td><td>$providerName</td></tr>';
|
||||
|
||||
$info .= $self->loadTemplate(
|
||||
'samlSpLogout',
|
||||
params => {
|
||||
url => $slo_url,
|
||||
name => $providerName,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
# HTTP-SOAP
|
||||
|
@ -2585,12 +2588,13 @@ sub sendLogoutRequestToProvider {
|
|||
$portal . '/saml/relaySingleLogoutSOAP?relay=' . $relayID;
|
||||
|
||||
# Display information to the user
|
||||
$info .= '<tr>'
|
||||
. '<td><img src="'
|
||||
. $slo_url
|
||||
. '" width="10px" height="10px" />' . '</td>' . '<td>'
|
||||
. $providerName . '</td>' . '</tr>';
|
||||
|
||||
$info .= $self->loadTemplate(
|
||||
'samlSpSoapLogout',
|
||||
params => {
|
||||
imgUrl => $slo_url,
|
||||
name => $providerName,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
# Send the request directly
|
||||
|
@ -2654,18 +2658,11 @@ sub sendLogoutRequestToProviders {
|
|||
my ( $self, $req, $logout, $relayState ) = @_;
|
||||
my $server = $self->lassoServer;
|
||||
my $providersCount = 0;
|
||||
my $info = '';
|
||||
my $content = '';
|
||||
|
||||
# Reset providerID into Lasso::Logout object
|
||||
$self->resetProviderIdIndex($logout);
|
||||
|
||||
# Header of the block which will be displayed to the user, if needed.
|
||||
#TODO: Replace this
|
||||
$info .= '<h3>'
|
||||
|
||||
#. $self->msg(Lemonldap::NG::Portal::Simple::PM_SAML_SPLOGOUT) . '</h3>'
|
||||
. '<table class="sloState">';
|
||||
|
||||
# Foreach SP found in session, get it from configuration, and send the
|
||||
# appropriate logout request (HTTP,POST,SOAP).
|
||||
while ( my $providerID = $self->getNextProviderId($logout) ) {
|
||||
|
@ -2682,16 +2679,17 @@ sub sendLogoutRequestToProviders {
|
|||
|
||||
# Add information if necessary
|
||||
if ($rinfo) {
|
||||
$info .= $rinfo;
|
||||
$content .= $rinfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# End of information block to be displayed to the user.
|
||||
$info .= '</table>';
|
||||
|
||||
# Print some information to the user.
|
||||
$req->info($info) if $providersCount;
|
||||
$req->info(
|
||||
$self->loadTemplate(
|
||||
'samlSpsLogout', params => { content => $content }
|
||||
)
|
||||
) if $providersCount;
|
||||
|
||||
return $providersCount;
|
||||
}
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"تسجيل الخروج",
|
||||
"logoutConfirm":"هل تريد تسجيل الخروج؟",
|
||||
"logoutFromOtherApp":"تسجيل الخروج من التطبيقات الأخرى ...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"البريد",
|
||||
"mailSent2":"تم إرسال رسالة إلى عنوان بريدك الإلكتروني.",
|
||||
"maintenanceMode":"هذا التطبيق في صيانة، يرجى محاولة الاتصال في وقت لاحق",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Logout",
|
||||
"logoutConfirm":"Do you want to logout?",
|
||||
"logoutFromOtherApp":"Logout from other applications...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Mail",
|
||||
"mailSent2":"A message has been sent to your mail address.",
|
||||
"maintenanceMode":"This application is in maintenance, please try to connect later",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Logout",
|
||||
"logoutConfirm":"Do you want to logout?",
|
||||
"logoutFromOtherApp":"Logout from other applications...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Mail",
|
||||
"mailSent2":"A message has been sent to your mail address.",
|
||||
"maintenanceMode":"This application is in maintenance, please try to connect later",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Logout",
|
||||
"logoutConfirm":"Do you want to logout?",
|
||||
"logoutFromOtherApp":"Logout from other applications...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Mail",
|
||||
"mailSent2":"A message has been sent to your mail address.",
|
||||
"maintenanceMode":"This application is in maintenance, please try to connect later",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Déconnexion",
|
||||
"logoutConfirm":"Souhaitez-vous vous déconnecter ?",
|
||||
"logoutFromOtherApp":"Déconnexion des autres applications...",
|
||||
"logoutFromSP":"Déconnexion des services...",
|
||||
"mail":"Adresse mail",
|
||||
"mailSent2":"Un message a été envoyé à votre adresse mail.",
|
||||
"maintenanceMode":"Cette application est en maintenance, merci de réessayer plus tard",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Logout",
|
||||
"logoutConfirm":"Vuoi uscire?",
|
||||
"logoutFromOtherApp":"Disconnetti da altre applicazioni ...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Mail",
|
||||
"mailSent2":"Vi é stato inviato un messaggio via mail",
|
||||
"maintenanceMode":"Questa applicazione è in manutenzione, prova a connetterti più tardi",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Logout",
|
||||
"logoutConfirm":"Do you want to logout?",
|
||||
"logoutFromOtherApp":"Logout from other applications...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Mail",
|
||||
"mailSent2":"A message has been sent to your mail address.",
|
||||
"maintenanceMode":"This application is in maintenance, please try to connect later",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Logout",
|
||||
"logoutConfirm":"Do you want to logout?",
|
||||
"logoutFromOtherApp":"Logout from other applications...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Mail",
|
||||
"mailSent2":"A message has been sent to your mail address.",
|
||||
"maintenanceMode":"This application is in maintenance, please try to connect later",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Logout",
|
||||
"logoutConfirm":"Do you want to logout?",
|
||||
"logoutFromOtherApp":"Logout from other applications...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Mail",
|
||||
"mailSent2":"A message has been sent to your mail address.",
|
||||
"maintenanceMode":"This application is in maintenance, please try to connect later",
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
"logout":"Đăng xuất",
|
||||
"logoutConfirm":"Bạn có muốn đăng xuất?",
|
||||
"logoutFromOtherApp":"Đăng xuất khỏi các ứng dụng khác ...",
|
||||
"logoutFromSP":"Logout from service providers...",
|
||||
"mail":"Thư",
|
||||
"mailSent2":"Một tin nhắn đã được gửi đến địa chỉ thư của bạn.",
|
||||
"maintenanceMode":"Ứng dụng này đang trong quá trình bảo trì, hãy thử kết nối sau",
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<tr>
|
||||
<td>
|
||||
<iframe src="<TMPL_VAR NAME="url">" alt="" marginwidth="0" marginheight="0" scrolling="no" class="noborder" width="10px" height="10px" frameborder="0"></iframe>
|
||||
</td>
|
||||
<td>
|
||||
<TMPL_VAR NAME="name">
|
||||
</td>
|
||||
</tr>
|
|
@ -0,0 +1,8 @@
|
|||
<tr>
|
||||
<td>
|
||||
<img src="<TMPL_VAR NAME="imgUrl">" width="10px" height="10px" />
|
||||
</td>
|
||||
<td>
|
||||
<TMPL_VAR NAME="name">
|
||||
</td>
|
||||
</tr>
|
|
@ -0,0 +1,4 @@
|
|||
<h3 trspan="logoutFromSP"></h3>
|
||||
<table class="sloState">
|
||||
<TMPL_VAR NAME="content">
|
||||
</table>
|
Loading…
Reference in New Issue
Block a user