The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::SAML2::IdP - Net::SAML2::IdP - SAML Identity Provider object

VERSION

version 0.57

SYNOPSIS

  my $idp = Net::SAML2::IdP->new_from_url(
        url => $url,
        cacert => $cacert,
        ssl_opts =>         # Optional options supported by LWP::Protocol::https
            {
                SSL_ca_file     => '/your/directory/cacert.pem',
                SSL_ca_path     => '/etc/ssl/certs',
                verify_hostname => 1,
            }
        );
  my $sso_url = $idp->sso_url('urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect');

NAME

Net::SAML2::IdP - SAML Identity Provider object

METHODS

new( )

Constructor

entityid
sls_force_lcase_url_encoding

Specifies that the IdP requires the encoding of a URL to be in lowercase. Necessary for a HTTP-Redirect of a LogoutResponse from Azure in particular. True (1) or False (0). Some web frameworks and underlying http requests assume that the encoding should be in the standard uppercase (%2F not %2f)

sls_double_encoded_response

Specifies that the IdP response sent to the HTTP-Redirect is double encoded. The double encoding requires it to be decoded prior to processing.

new_from_url( url => $url, cacert => $cacert, ssl_opts => {} )

Create an IdP object by retrieving the metadata at the given URL.

Dies if the metadata can't be retrieved with reason.

new_from_xml( xml => $xml, cacert => $cacert )

Constructor. Create an IdP object using the provided metadata XML document.

BUILD ( hashref of the parameters passed to the constructor )

Called after the object is created to validate the IdP using the cacert

sso_url( $binding )

Returns the url for the SSO service using the given binding. Binding name should be the full URI.

slo_url( $binding )

Returns the url for the Single Logout Service using the given binding. Binding name should be the full URI.

art_url( $binding )

Returns the url for the Artifact Resolution service using the given binding. Binding name should be the full URI.

cert( $use )

Returns the IdP's certificate for the given use (e.g. signing).

binding( $name )

Returns the full Binding URI for the given binding name (i.e. redirect or soap). Includes this module's currently-supported bindings.

format( $short_name )

Returns the full NameID Format URI for the given short name.

If no short name is provided, returns the URI for the default format, the one listed first by the IdP.

If no NameID formats were advertised by the IdP, returns undef.

AUTHOR

Chris Andrews <chrisa@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Chris Andrews and Others, see the git log.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.