Net::SA...ssertion(3)

πŸ“¦ version 0.85, in alpine 3.24

πŸ’… Net::SAML2::Protocol::Assertion πŸ’…

okay bestie, welcome to the User Contributed Perl Documentation for this SAML2 icon. It’s version 0.85 and it’s giving iconic assertion-object energy, lowkey highkey essential, no cap. ✨

πŸ’– NAME πŸ’–

Net::SAML2::Protocol::Assertion β€” SAML2 assertion object 🫢

✨ VERSION ✨

version 0.85 β€” that’s the version, periodt. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

  my $assertion = Net::SAML2::Protocol::Assertion->new_from_xml(
    xml => decode_base64($SAMLResponse)
  );

πŸ‘‘ METHODS πŸ‘‘

okay, methods section, main character energy, let’s go. 🌈

πŸŽ€ new_from_xml( ... ) πŸŽ€

Constructor. Creates an instance of the Assertion object, parsing the given XML to find the attributes, session and nameid. 🧚

Arguments:

  • xml β€” XML data.
  • key_file β€” Optional but Required handling Encrypted Assertions. path to the SP's private key file that matches the SP's public certificate used by the IdP to Encrypt the response (or parts of the response).
  • cacert β€” path to the CA certificate for verification. Optional: This is only used for validating the certificate provided for a signed Assertion that was found when the EncryptedAssertion is decrypted.

While optional it is recommended for ensuring that the Assertion in an EncryptedAssertion is properly validated.

πŸ”₯ response_status πŸ”₯

Returns the response status. βœ…

πŸ“ response_substatus πŸ“

SAML errors are usually "nested" ("Responder -> RequestDenied" for instance, means that the responder in this transaction (the IdP) denied the login request). For proper error message generation, both levels are needed. 😭

πŸ’œ name πŸ’œ

Returns the CN attribute, if provided.

🌸 nameid 🌸

Returns the NameID.

πŸ¦‹ nameid_format πŸ¦‹

Returns the NameID Format.

πŸŽ€ nameid_name_qualifier πŸŽ€

Returns the NameID NameQualifier.

🧚 nameid_sp_name_qualifier 🧚

Returns the NameID SPNameQualifier.

⭐ nameid_sp_provided_id ⭐

Returns the NameID SPProvidedID.

πŸ‘‘ authnstatement πŸ‘‘

Returns the AuthnStatement.

✨ authnstatement_authninstant ✨

Returns the AuthnStatement AuthnInstant.

🌈 authnstatement_sessionindex 🌈

Returns the AuthnStatement SessionIndex.

πŸ’– authnstatement_subjectlocality πŸ’–

Returns the AuthnStatement SubjectLocality.

🫢 subjectlocality_address 🫢

Returns the SubjectLocality Address.

πŸ”₯ subjectlocality_dnsname πŸ”₯

Returns the SubjectLocality DNSName.

🧚 authnstatement_authncontext 🧚

Returns the AuthnContext for the AuthnStatement.

πŸŽ€ contextclass_authncontextclassref πŸŽ€

Returns the ContextClass AuthnContextClassRef.

πŸ’œ valid( $audience, $in_response_to ) πŸ’œ

Returns true if this Assertion is currently valid for the given audience. πŸ‘‘

Also accepts $in_response_to which it checks against the returned Assertion. This is very important for security as it helps ensure that the assertion that was received was for the request that was made. πŸ”’

Checks the audience matches, and that the current time is within the Assertions validity period as specified in its Conditions element. ⏰

πŸ“ success πŸ“

Returns true if the response status is a success, returns false otherwise. In case the assertion isn't successful, the response_status and response_substatus calls can be used to see why the assertion wasn't successful. πŸ’€

🌸 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. 🫢


mwah πŸ’‹ and that’s the whole page, bestie β€” the footer energy is perl v5.42.2 and the date is 2026-02-11, with the manual name folded in as Net::SAML2::Protocol::Assertion (and the truncated footer version Net::SA...ssertion(3) if you’re keeping score). 🌟

πŸ“¦ where this page comes from