Net::SA...esponse(3)

πŸ“¦ version 0.85, in alpine 3.24

πŸ’… Net::SAML2::Object::Response β€” a response object (yes bestie, from Net::SA...esponse(3), the perl manpage)

okay so picture this: you're deep in a SAML flow, the IdP just handed you a response, and you're standing there like πŸ§β€β™€οΈ wondering what to do with it. enter Net::SAML2::Object::Response β€” a generic response object that lets you actually deal with an response from the IdP. if the status is successful you can grab an assertion and continue your flow. if not… well, you get to find out why, which is also iconic in its own way. ✨

Version: 0.85 β€” noted, loved, remembered. πŸŽ€


🌸 SYNOPSIS 🌸

use Net::SAML2::Object::Response;

my $xml = ...;
my $response = Net::SAML2::Object::Response->new_from_xml(xml => $xml);

if (!$response->is_success) {
    warn "Got a response but isn't successful";

    my $status = $response->status;
    my $substatus = $response->substatus;

    warn "We got a $status back with the following sub status $substatus";
}
else {
    $response->to_assertion(
        # See Net::SAML2::Protocol::Assertion->new_from_xml for the other
        # construction options
        key_file => ...,
        key_name => ...,
    )
}
not me writing an if/else that's literally the whole personality of this module 😭 this is the vibe check you run on every response, fr fr.

πŸ¦‹ DESCRIPTION πŸ¦‹

A generic response object to be able to deal with an response from the IdP. (the grammar? not the point. the functionality? flawless.) If the status is successful you can grab an assertion and continue your flow. πŸ’–


πŸ‘‘ ATTRIBUTES πŸ‘‘

status

Returns the status of the response. ⭐

substatus

Returns the sub status of the response. like the status but deeper. πŸŒ€

assertions

Returns the nodes of the assertion. πŸŽ€


🧚 METHODS 🧚

  • $self->new_from_xml(xml => $xml) β€” Creates the response object based on the response XML. hand it the raw XML, get a whole object back. slay. πŸ”₯
  • $self->to_string β€” Stringify the object to the full response XML. it's giving "round trip", it's giving "i contain the original XML and i'm not afraid to show it". πŸ’…
  • $self->to_assertion(%args) β€” Create a Net::SAML2::Protocol::Assertion from the response. see "new_from_xml" in Net::SAML2::Protocol::Assertion for more. this is the main character method, honestly β€” it's where the flow keeps going. πŸ‘‘

πŸ’œ AUTHOR πŸ’œ

Timothy Legge <timlegge@gmail.com> 🫢


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. πŸ’– (yes, the same terms as Perl 5 itself β€” that's the whole license, no cap.)


okay that's the whole page bestie!! go forth and parse those responses πŸ’…βœ¨

signing off with the cutest possible footer energy: this was perl v5.42.2, dated 2026-02-11, and the manpage it came from is Net::SA...esponse(3) β€” the truncated little icon that it is πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from