Skip to content

Commit 99bb04c

Browse files
committed
testapp: add relaystate for a redirect binding
1 parent 116d948 commit 99bb04c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NAME
22
Net::SAML2 - SAML2 bindings and protocol implementation
33

44
VERSION
5-
version 0.77
5+
version 0.78
66

77
SYNOPSIS
88
See TUTORIAL.md for implementation documentation and
@@ -83,6 +83,7 @@ DESCRIPTION
8383
GSuite (Google)
8484
Jump
8585
Keycloak
86+
MockSAML (https://mocksaml.com/)
8687
Mircosoft ADFS
8788
Okta
8889
OneLogin

lib/Net/SAML2.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ SP applications if EncryptedAssertions are not in use.
118118
119119
=item Keycloak
120120
121+
=item MockSAML (https://mocksaml.com/)
122+
121123
=item Mircosoft ADFS
122124
123125
=item Okta

xt/testapp/lib/Saml2Test.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ get '/login' => sub {
196196
)->as_xml;
197197

198198
my $redirect = $sp->sso_redirect_binding($idp, 'SAMLRequest');
199-
my $url = $redirect->sign($authnreq);
199+
my $url = $redirect->sign($authnreq, config->{idp_name});
200200
redirect $url, 302;
201201

202202
return "Redirected\n";
@@ -304,7 +304,7 @@ post '/consumer-post' => sub {
304304
my $relay_state = params->{RelayState} // '';
305305

306306
my $idp_name;
307-
if ($relay_state ne '') {
307+
if ($relay_state ne '' and defined $relay_state) {
308308
$idp_name = $relay_state;
309309
$cacert = 'IdPs/' . $idp_name . '/cacert.pem';
310310
} else {

0 commit comments

Comments
 (0)