Skip to content

Commit 571f7a9

Browse files
committed
testapp Fix issue in metadata generation missing fully qualified URI
artifact_request destination should be IdP specified provide encryption key to decrypt assertion
1 parent 5f0412e commit 571f7a9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

xt/testapp/lib/Saml2Test.pm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ get '/consumer-artifact' => sub {
171171
my $artifact = params->{SAMLart};
172172

173173
my $sp = _sp();
174-
my $request = $sp->artifact_request($idp->entityid, $artifact)->as_xml;
174+
my $request = $sp->artifact_request($art_url, $artifact)->as_xml;
175175

176176
my $ua = LWP::UserAgent->new;
177177

@@ -190,7 +190,8 @@ get '/consumer-artifact' => sub {
190190

191191
if ($response) {
192192
my $assertion = Net::SAML2::Protocol::Assertion->new_from_xml(
193-
xml => $response
193+
xml => $response,
194+
key_file => config->{key},
194195
);
195196

196197
template 'user', { assertion => $assertion };
@@ -271,14 +272,14 @@ sub _sp {
271272
assertion_consumer_service => [
272273
{
273274
Binding => BINDING_HTTP_POST,
274-
Location => config->{slo_url_post},
275+
Location => config->{url} . config->{slo_url_post},
275276
isDefault => 'false',
276277
# optionally
277278
index => 1,
278279
},
279280
{
280281
Binding => BINDING_HTTP_ARTIFACT,
281-
Location => config->{acs_url_artifact},
282+
Location => config->{url} . config->{acs_url_artifact},
282283
isDefault => 'true',
283284
index => 2,
284285
}],

0 commit comments

Comments
 (0)