NAME

Net::SPID::Session

VERSION

version 0.15

SYNOPSIS

use Net::SPID;

# initialize our SPID object
my $spid = Net::SPID->new(...);

# parse a response from an Identity Provider
my $assertion = eval {
    $spid->parse_assertion($saml_response_xml, $authnreq_id);
};

# get a Net::SPID::Session object (serializable for later reuse, such as logout)
my $session = $assertion->spid_session;

ABSTRACT

This class represents a SPID session. It encapsulates the assertion and its most important data (nameid, session number, attributes) for later reuse, including for logout purposes.

CONSTRUCTOR

This class is not supposed to be initialized directly. It can be generated by calling the "spid_session" in Net::SPID::SAML::In::Response method.

METHODS

idp_id

This method returns the entityID of the Identity Provider which emitted the assertion (and to which any logout request must go).

nameid

This method returns the subject identifier as returned in the assertion.

session_index

This method returns the session identifier as returned in the assertion.

assertion_xml

This method returns the raw XML of the assertion.

level

The SPID level authenticated by the Identity Provider. You may want to check this value as it might be equal or higher than the one you requested.

attributes

This method returns a hashref containing the attributes.

AUTHOR

Alessandro Ranellucci <aar@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Alessandro Ranellucci.

This is free software, licensed under:

The (three-clause) BSD License