File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use strict;
22use warnings;
33use Test::Lib;
44use Test::Net::SAML2;
5- use URN::OASIS::SAML2 qw( :urn) ;
5+ use URN::OASIS::SAML2 qw( :urn NAMEID_EMAIL ) ;
66
77use Net::SAML2::Protocol::LogoutRequest;
88
5050 " We don't have SPProvidedID as an attribute in the nameid"
5151);
5252
53+ {
54+ my $lor = Net::SAML2::Protocol::LogoutRequest-> new(%args , nameid_format => NAMEID_EMAIL());
55+ my $xpath = get_xpath(
56+ $lor -> as_xml,
57+ samlp => URN_PROTOCOL,
58+ saml => URN_ASSERTION,
59+ );
60+ test_xml_attribute_ok($xpath , ' /samlp:LogoutRequest/@ID' , qr / ^NETSAML2_/ );
61+ test_xml_attribute_ok($xpath , ' /samlp:LogoutRequest/@IssueInstant' , ' foo' );
62+ my $name_id = get_single_node_ok($xpath , ' /samlp:LogoutRequest/saml:NameID' );
63+ is($name_id -> getAttribute(' Format' ), NAMEID_EMAIL());
64+
65+ foreach (qw( NameQualifier SPNameQualifier SPProvidedID) ) {
66+ is($name_id -> getAttribute($_ ),
67+ undef , " We don't have $_ as an attribute in the nameid" );
68+ }
69+
70+ }
71+
5372{
5473 my $lor = Net::SAML2::Protocol::LogoutRequest-> new(%args ,
5574 sp_provided_id => " Some provided ID" );
You can’t perform that action at this time.
0 commit comments