Net::SA...erifyXML(3)
π¦ Net::SAML2::Role::VerifyXML β a role to verify the SAML response XML π
okay so bestie, this is Net::SAML2::Role::VerifyXML, straight out of the User Contributed Perl Documentation section of your man pages. It's a Moose role π β you slap it on a class and boom, that class can verify SAML response XML. Iconic. Let's get into it.
β¨ VERSION β¨
version 0.85 β that's the one, no cap π
πΈ SYNOPSIS πΈ
so here's the whole vibe of how you'd use it:
use Net::SAML2::Some::Module;
use Moose;
with 'Net::SAML2::Role::VerifyXML';
sub do_something_with_xml {
my $self = shift;
my $xml = shift;
$self->verify_xml($xml,
# Most of these options are passed to Net::SAML2::XML::Sig, except for the
# cacert
# Most options are optional
cacert => $self->cacert,
cert_text => $self->cert,
no_xml_declaration => 1,
);
}
like, you with the role, and then verify_xml just exists on your object now. main character energy fr fr π and yes, most of those options get passed straight through to Net::SAML2::XML::Sig β the one exception is cacert. also note: most options are optional π
π§ DESCRIPTION π§
bestie. there's literally nothing here. the DESCRIPTION section is empty in the actual page β no prose, not a single word π so I'm not gonna sit here and make stuff up. the good stuff is all in METHODS. moving on π«Ά
π METHODS π
β verify_xml($xml, %args)
this is the whole point of the role, honestly. here's the full spread of what it takes:
$self->verify_xml($xml,
# Most of these options are passed to Net::SAML2::XML::Sig, except for the
# cacert
# Most options are optional
cert_text => $self->cert,
no_xml_declaration => 1,
# Used for a trust model, if lacking, everything is trusted
cacert => $self->cacert,
# or check specific certificates based on subject/issuer or issuer hash
anchors => {
# one of the following is allowed
subject => ["subject a", "subject b"],
issuer => ["Issuer A", "Issuer B"],
issuer_hash => ["Issuer A hash", "Issuer B hash"],
},
);
a little tour of the args, since you asked:
$xmlβ the XML you're verifying. the whole reason you're here π%argsβ the rest of the options. most options are optional, and most of them get forwarded toNet::SAML2::XML::Sigβ exceptcacert, which is special.cert_textβ the cert text, passed through.no_xml_declarationβ here it's set to1. yes bestie,1is a value, we stay precise πcacertβ used for a trust model. and heads up: if it's lacking, everything is trusted ππ₯ take that in for a sec, that's literally the documented behaviour.anchorsβ the alternative tocacert: check specific certificates instead. it's a hashref, and one of the following is allowed inside it:subjectβ a list like["subject a", "subject b"]issuerβ a list like["Issuer A", "Issuer B"]issuer_hashβ a list like["Issuer A hash", "Issuer B hash"]
β οΈ re-read thatcacertline, okay? lacking acacertmeans everything is trusted. that's the documented behaviour, not me being dramatic π
π AUTHOR π
Timothy Legge <timlegge@gmail.com> β shoutout, legend behaviour π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Venda Ltd, see the CONTRIBUTORS file for others. π«Ά
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay π
and that's the page, bestie β¨ this was perl v5.42.2, dated 2026-02-11 β go verify some XML, ily, bye π¦πΈπ
π¦ where this page comes from
- alpine 3.24: perl-net-saml2-doc 0.85-r0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms