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

NAME

Net::SAML2::Binding::Redirect

SYNOPSIS

  my $redirect = Net::SAML2::Binding::Redirect->new(
    key => 'sign-nopw-cert.pem',
    url => $sso_url,
    param => 'SAMLRequest',
  );

  my $url = $redirect->sign($authnreq);

  # or

  my $redirect = Net::SAML2::Binding::Redirect->new(
    cert => $idp_cert,
    param => 'SAMLResponse',
  );
 
  my $ret = $redirect->verify($url);

METHODS

new( ... )

Constructor. Creates an instance of the Redirect binding.

Arguments:

 * key - the signing key (for creating Redirect URLs)
 * cert - the IdP's signing cert (for verifying Redirect URLs)
 * url - the IdP's SSO service url for the Redirect binding
 * param - the query param name to use (SAMLRequest, SAMLResponse)

sign($request, $relaystate)

Signs the given request, and returns the URL to which the user's browser should be redirected.

Accepts an optional RelayState parameter, a string which will be returned to the requestor when the user returns from the authentication process with the IdP.

verify($url)

Decode a Redirect binding URL.

Verifies the signature on the response.