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

NAME

Net::SAML2::SP - Net::SAML2::SP - SAML Service Provider object

VERSION

version 0.41

SYNOPSIS

  my $sp = Net::SAML2::SP->new(
    id   => 'http://localhost:3000',
    url  => 'http://localhost:3000',
    cert => 'sign-nopw-cert.pem',
    key => 'sign-nopw-key.pem',
  );

NAME

Net::SAML2::SP - SAML Service Provider object

METHODS

new( ... )

Constructor. Create an SP object.

Arguments:

url

base for all SP service URLs

id

SP's identity URI.

cert

path to the signing certificate

key

path to the private key for the signing certificate

cacert

path to the CA certificate for verification

org_name

SP organisation name

org_display_name

SP organisation display name

org_contact

SP contact email address

org_url

SP organization url. This is optional and url will be used as in previous versions if this is not provided.

authnreq_signed

Specifies in the metadata whether the SP signs the AuthnRequest Optional (0 or 1) defaults to 1 (TRUE) if not specified.

want_assertions_signed

Specifies in the metadata whether the SP wants the Assertion from the IdP to be signed Optional (0 or 1) defaults to 1 (TRUE) if not specified.

BUILD ( hashref of the parameters passed to the constructor )

Called after the object is created to load the cert from a file

authn_request( $destination, $nameid_format )

Returns an AuthnRequest object created by this SP, intended for the given destination, which should be the identity URI of the IdP.

logout_request( $destination, $nameid, $nameid_format, $session )

Returns a LogoutRequest object created by this SP, intended for the given destination, which should be the identity URI of the IdP.

Also requires the nameid (+format) and session to be logged out.

logout_response( $destination, $status, $response_to )

Returns a LogoutResponse object created by this SP, intended for the given destination, which should be the identity URI of the IdP.

Also requires the status and the ID of the corresponding LogoutRequest.

artifact_request( $destination, $artifact )

Returns an ArtifactResolve request object created by this SP, intended for the given destination, which should be the identity URI of the IdP.

sso_redirect_binding( $idp, $param )

Returns a Redirect binding object for this SP, configured against the given IDP for Single Sign On. $param specifies the name of the query parameter involved - typically SAMLRequest.

slo_redirect_binding( $idp, $param )

Returns a Redirect binding object for this SP, configured against the given IDP for Single Log Out. $param specifies the name of the query parameter involved - typically SAMLRequest or SAMLResponse.

soap_binding( $ua, $idp_url, $idp_cert )

Returns a SOAP binding object for this SP, with a destination of the given URL and signing certificate.

XXX UA

post_binding( )

Returns a POST binding object for this SP.

metadata( )

Returns the metadata XML document for this SP.

AUTHOR

Chris Andrews <chrisa@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 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.