Net::SAML2::Protocol::Assertion - SAML2 assertion object
version 0.79
my $assertion = Net::SAML2::Protocol::Assertion->new_from_xml( xml => decode_base64($SAMLResponse) );
Constructor. Creates an instance of the Assertion object, parsing the given XML to find the attributes, session and nameid.
Arguments:
XML data
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)
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.
Returns the response status
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.
Returns the CN attribute, if provided.
Returns the NameID
Returns the NameID Format
Returns the NameID NameQualifier
Returns the NameID SPNameQualifier
Returns the NameID SPProvidedID
Returns the AuthnStatement
Returns the AuthnStatement AuthnInstant
Returns the AuthnStatement SessionIndex
Returns the AuthnStatement SubjectLocality
Returns the SubjectLocality Address
Returns the SubjectLocality DNSName
Returns the AuthnContext for the AuthnStatement
Returns the ContextClass AuthnContextClassRef
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.
Returns true if the response status is a success, returns false otherwise. In case the assertion isn't successfull, the "response_status" and "response_substatus" calls can be use to see why the assertion wasn't successful.
Chris Andrews <chrisa@cpan.org>
Timothy Legge <timlegge@gmail.com>
This software is copyright (c) 2024 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.
To install Net::SAML2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SAML2
CPAN shell
perl -MCPAN -e shell install Net::SAML2
For more information on module installation, please visit the detailed CPAN module installation guide.