Net::SAML2::Binding::Redirect - Net::SAML2::Binding::Redirect - HTTP Redirect binding for SAML
version 0.58
my $redirect = Net::SAML2::Binding::Redirect->new( key => '/path/to/SPsign-nopw-key.pem', # Service Provider (SP) private key url => $sso_url, # Service Provider Single Sign Out URL param => 'SAMLRequest' OR 'SAMLResponse', # Type of request cert => $idp->cert('signing') # Identity Provider (IdP) certificate sig_hash => 'sha1', 'sha224', 'sha256', 'sha384', 'sha512' # Signature to sign request ); my $url = $redirect->sign($authnreq); my $ret = $redirect->verify($url);
Net::SAML2::Binding::Redirect
Constructor. Creates an instance of the Redirect binding.
Arguments:
The SP's (Service Provider) also known as your application's signing key that your application uses to sign the AuthnRequest. Some IdPs may not verify the signature.
IdP's (Identity Provider's) certificate that is used to verify a signed Redirect from the IdP. It is used to verify the signature of the Redirect response.
IdP's SSO (Single Sign Out) service url for the Redirect binding
query param name to use (SAMLRequest, SAMLResponse) Defaults to SAMLRequest.
SAMLRequest
RSA hash to use to sign request
Supported:
sha1, sha224, sha256, sha384, sha512
Defaults to sha1.
sha1
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)
Specifies that the IdP response sent to the HTTP-Redirect is double encoded. The double encoding requires it to be decoded prior to processing.
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.
Decode a Redirect binding URL.
Verifies the signature on the response.
Chris Andrews <chrisa@cpan.org>
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.
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.