NAME
Net::SAML2::Object::Response - A response object
VERSION
version 0.88
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 => ...,
)
}
DESCRIPTION
A generic response object to be able to deal with an response from the IdP. 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
assertions
Returns the nodes of the assertion
cacert
path to the CA certificate for verification. This is required for validating the certificate provided for a Response.
It is required for ensuring that the Response is properly validated.
insecure_trust_embedded_cert
Boolean, default false. When true, to_assertion proceeds with no pre-configured trust anchor (every embedded signing certificate is accepted). This disables effective signature verification and is intended only for local testing. Production deployments must leave this false and supply cacert.
METHODS
$self->new_from_xml(xml => $xml, destination => $destination)
Creates the response object based on the response XML
$self->to_string
Stringify the object to the full response XML
$self->to_assertion(%args)
Create a Net::SAML2::Protocol::Assertion from the response. See "new_from_xml" in Net::SAML2::Protocol::Assertion for more.
AUTHOR
Timothy Legge <timlegge@gmail.com>
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.