NAME
Net::SAML2::Binding::POST - HTTP POST binding for SAML
VERSION
version 0.88
SYNOPSIS
my $post = Net::SAML2::Binding::POST->new(
cacert => '/path/to/ca-cert.pem'
);
my $xml = $post->handle_response(
$saml_response
);
METHODS
new( )
Constructor. Returns an instance of the POST binding.
Arguments:
- cacert
-
path to the CA certificate for verification
Notice: when
handle_responseis called, at least one ofcacertorcert_textmust have been supplied at construction, unlessinsecure_trust_embedded_certis set. Without a trust anchor the binding accepts whatever signing certificate the response embeds in its KeyInfo block, which is equivalent to no signature checking at all. - cert
-
path to a certificate that is added to the signed XML. It needs to be the certificate that includes the public key related to the key
- cert_text
-
text form of the certificate in FORMAT_ASN1 or FORMAT_PEM that is used to verify the signed XML.
See insecure_trust_embedded_cert
- key
-
path to a key used to sign the XML.
- insecure_trust_embedded_cert
-
Boolean, default false. When true,
handle_responseproceeds 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 supplycacertorcert_text. Has no effect on the binding's signing path (sign_xml).
handle_response( $response )
my $xml = $self->handle_response($response);
Decodes and verifies the Base64-encoded SAMLResponse CGI parameter. Returns the decoded response as XML.
sign_xml( $request )
Sign and encode the SAMLRequest.
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.