{"id":15286198,"url":"https://github.com/perl-net-saml2/perl-net-saml2","last_synced_at":"2025-04-13T03:07:58.184Z","repository":{"id":42230622,"uuid":"268385649","full_name":"perl-net-saml2/perl-Net-SAML2","owner":"perl-net-saml2","description":"Net::SAML2 - SAML bindings and protocol implementation","archived":false,"fork":false,"pushed_at":"2025-01-04T02:56:32.000Z","size":1163,"stargazers_count":8,"open_issues_count":5,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T03:07:49.220Z","etag":null,"topics":["authentication","authnrequest","identityprovider","idp","metadata","perl","protocol","saml2","samlresponse","serviceprovider","sp","web-app"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Net::SAML2","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perl-net-saml2.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-01T00:02:06.000Z","updated_at":"2025-01-04T02:56:37.000Z","dependencies_parsed_at":"2024-01-05T02:28:03.476Z","dependency_job_id":"dc752162-ed55-46f9-8362-25587a963296","html_url":"https://github.com/perl-net-saml2/perl-Net-SAML2","commit_stats":{"total_commits":541,"total_committers":11,"mean_commits":49.18181818181818,"dds":0.4288354898336414,"last_synced_commit":"0fc0914a4a4ec79b39e30e7fd747393c517fbc96"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-net-saml2%2Fperl-Net-SAML2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-net-saml2%2Fperl-Net-SAML2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-net-saml2%2Fperl-Net-SAML2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perl-net-saml2%2Fperl-Net-SAML2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perl-net-saml2","download_url":"https://codeload.github.com/perl-net-saml2/perl-Net-SAML2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657918,"owners_count":21140846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authnrequest","identityprovider","idp","metadata","perl","protocol","saml2","samlresponse","serviceprovider","sp","web-app"],"created_at":"2024-09-30T15:10:56.631Z","updated_at":"2025-04-13T03:07:58.163Z","avatar_url":"https://github.com/perl-net-saml2.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    Net::SAML2 - SAML2 bindings and protocol implementation\n\nVERSION\n    version 0.82\n\nSYNOPSIS\n      See TUTORIAL.md for implementation documentation and\n      t/12-full-client.t for a pseudo implementation following the tutorial\n\n      # generate a redirect off to the IdP:\n\n            my $idp = Net::SAML2::IdP-\u003enew($IDP);\n            my $sso_url = $idp-\u003esso_url('urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect');\n\n            my $authnreq = Net::SAML2::Protocol::AuthnRequest-\u003enew(\n                    issuer        =\u003e 'http://localhost:3000/metadata.xml',\n                    destination   =\u003e $sso_url,\n                    nameid_format =\u003e $idp-\u003eformat('persistent'),\n            )-\u003eas_xml;\n\n            my $authnreq = Net::SAML2::Protocol::AuthnRequest-\u003enew(\n              id            =\u003e 'NETSAML2_Crypt::OpenSSL::Random::random_pseudo_bytes(16),\n              issuer        =\u003e $self-\u003e{id},         # Service Provider (SP) Entity ID\n              destination   =\u003e $sso_url,            # Identity Provider (IdP) SSO URL\n              provider_name =\u003e $provider_name,      # Service Provider (SP) Human Readable Name\n              issue_instant =\u003e DateTime-\u003enow,       # Defaults to Current Time\n            );\n\n            my $request_id = $authnreq-\u003eid; # Store and Compare to InResponseTo\n\n            # or\n\n            my $request_id = 'NETSAML2_' . unpack 'H*', Crypt::OpenSSL::Random::random_pseudo_bytes(16);\n\n            my $authnreq = Net::SAML2::Protocol::AuthnRequest-\u003eas_xml(\n              id            =\u003e $request_id,         # Unique Request ID will be returned in response\n              issuer        =\u003e $self-\u003e{id},         # Service Provider (SP) Entity ID\n              destination   =\u003e $sso_url,            # Identity Provider (IdP) SSO URL\n              provider_name =\u003e $provider_name,      # Service Provider (SP) Human Readable Name\n              issue_instant =\u003e DateTime-\u003enow,       # Defaults to Current Time\n            );\n\n            my $redirect = Net::SAML2::Binding::Redirect-\u003enew(\n                    key =\u003e '/path/to/SPsign-nopw-key.pem',\n                    url =\u003e $sso_url,\n                    param =\u003e 'SAMLRequest' OR 'SAMLResponse',\n                    cert =\u003e '/path/to/IdP-cert.pem'\n            );\n\n            my $url = $redirect-\u003esign($authnreq);\n\n            my $ret = $redirect-\u003everify($url);\n\n      # handle the POST back from the IdP, via the browser:\n\n            my $post = Net::SAML2::Binding::POST-\u003enew;\n            my $ret = $post-\u003ehandle_response(\n                    $saml_response\n            );\n\n            if ($ret) {\n                    my $assertion = Net::SAML2::Protocol::Assertion-\u003enew_from_xml(\n                            xml         =\u003e decode_base64($saml_response),\n                            key_file    =\u003e \"SP-Private-Key.pem\",    # Required for EncryptedAssertions\n                            cacert      =\u003e \"IdP-cacert.pem\",        # Required for EncryptedAssertions\n                    );\n\n                    # ...\n            }\n\nDESCRIPTION\n    Support for the Web Browser SSO profile of SAML2.\n\n    Net::SAML2 correctly perform the SSO process against numerous SAML\n    Identity Providers (IdPs). It has been tested against:\n\n    Version 0.54 and newer support EncryptedAssertions. No changes required\n    to existing SP applications if EncryptedAssertions are not in use.\n\n    Auth0 (requires Net::SAML2 \u003e=0.39)\n    Azure (Microsoft Office 365)\n    GSuite (Google)\n    Jump\n    Keycloak\n    MockSAML (https://mocksaml.com/)\n    Mircosoft ADFS\n    Okta\n    OneLogin\n    PingIdentity (requires Net::SAML2 \u003e=0.54)\n    SAMLTEST.ID (requires Net::SAML2 \u003e=0.63)\n    Shibboleth (requires Net::SAML2 \u003e=0.63)\n    SimpleSAMLphp\n    DigiD (requires Net::SAML2 \u003e= 0.63)\n    eHerkenning (requires Net::SAML2 \u003e= 0.73)\n    eIDAS (requires Net::SAML2 \u003e= 0.73)\n\nMAJOR CAVEATS\n    SP-side protocol only\n    Requires XML metadata from the IdP\n\nAUTHORS\n    *   Chris Andrews \u003cchrisa@cpan.org\u003e\n\n    *   Timothy Legge \u003ctimlegge@gmail.com\u003e\n\nCOPYRIGHT AND LICENSE\n    This software is copyright (c) 2024 by Venda Ltd, see the CONTRIBUTORS\n    file for others.\n\n    This is free software; you can redistribute it and/or modify it under\n    the same terms as the Perl 5 programming language system itself.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperl-net-saml2%2Fperl-net-saml2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperl-net-saml2%2Fperl-net-saml2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperl-net-saml2%2Fperl-net-saml2/lists"}