Skip to content

Commit

Permalink
v2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
milesimarco committed May 8, 2023
1 parent a73a401 commit 47ad9ce
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 7 deletions.
1 change: 1 addition & 0 deletions frontend-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function spid_get_idp_list( $showinfo = false, $spid_redirect_to = '' ) {
$shuffle[] = array( 'Intesa ID', 'https://spid.intesa.it', 'intesaid', 8 );
$shuffle[] = array( 'Lepida ID', 'https://id.lepida.it/idp/shibboleth', 'lepidaid', 9 );
$shuffle[] = array( 'TeamSystem ID', 'https://spid.teamsystem.com/idp', 'teamsystemid', 10 );
$shuffle[] = array( 'Etna ID', 'https://id.eht.eu/SLS', 'etnaid', 11 );
shuffle( $shuffle );
$provider = array_merge( $provider, $shuffle );

Expand Down
67 changes: 67 additions & 0 deletions img/idp/spid-idp-etnaid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions lib/src/Spid/Saml/In/BaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public function __construct(Saml $saml = null)
gzinflate(base64_decode($_GET['SAMLResponse'])) :
base64_decode($_POST['SAMLResponse']);

if ( !$xmlString ) { // MM 20230304
return;
}

$this->xml = new \DOMDocument();
$this->xml->loadXML($xmlString);

Expand Down
145 changes: 145 additions & 0 deletions metadata/idp_11.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" ID="_id-83bbfdd3-e4c4-42cf-a024-e4733569a4ae" entityID="https://id.eht.eu"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference URI="#_id-83bbfdd3-e4c4-42cf-a024-e4733569a4ae">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>Jz1Jsaqv5fkbxLtkuLhS9iDujscnCtR1gk2bGUKa/bk=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
attSTAP3eMxz5y9B8Eywi3NYwQNUnkuEGkBoXouXzl41CdK6PClj20mkCCLTdBIcRzipu6iB51Uo
V+v0DQje2PB1eN0ri5KO7Dw+/fNqRpPRokFAwAb+sLuUGtUCsT200fuJsqiKQHz4ytxO7VAI9SiF
/9s9E5lIss62iWVEkOf/5ozwlIJjJMI+apdQbuoQhe+/F0+S6Zk+5EIe5yxSwweGn5HIycfm8jNr
CAaDQU+2XngafBRvsO9rhRJmbAOoJbPaBlpmMFfNWgSLBNF+oaZ/tvUjivrc6lPAZhghkBwvajzd
O3r8rZTTh0I+yPPe2C6KnDoYIuL8hfWC0FebpT3ceufGSqHeXqYZpirFHd8ESCCVfeqz0E6wz13X
etwTJtp7VoQg04pmkQDOHsDiZgx6ox+IK5w9Rm4EmYgUs9k78tpRjDRppo6CcFI+fLJXOoqOCWty
gwxWjrCXw3dz0r5R6maHvs0qrv+7q8wCpYBn/WQlMCw0ETlpiMMlxgMNfYAnkbz+LUCl856vsL5e
ZGvY1HWck7ncaCGVGaY9MzxZuz4fhDKMyT/W5jCYlgrjtSTlj3rm9oP0Kmaokwwwn+Fwq7OQ1qx4
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dpZC5nb3YuaXQvY3Bz
L0FnSURfZUlEQVNfcm9vdENBX2Nwcy5wZGYwTwYGBACORgEFMEUwQwYIKwYBBQUHAgEWN2h0dHBz
Oi8vZWlkYXMuYWdpZC5nb3YuaXQvY3BzL0FnSURfZUlEQVNfcm9vdENBX2Nwcy5wZGYwDQYJKoZI
hvcNAQENBQADggIBABlvKT22WGSr8xeLC0HcCtcZh1G2M+/4vDrptipMGNtpJQ3Oz3srPIo2WK9F
qQGJ/Msd7L9n0uJz2c0/WRlFI/wom1KakyG4IxrerX7li5GhVGczse6eY+YbUBWFKsDseYE+1KTl
hXJeyWfeT42VgYU24Zx4vFjvvGmTh3u2z6EYotFsUzZv2rA55uukxI7pat9u/plaBi9RIV5FUudC
D6+5wpmUB6ks1sKGDnt9p7OtqDgTUnTiZKpSuW3E/TOp+EmedtYgujUhcpQ6vElbBs+nc9XH51Zw
3wmuxaq/knCmdTXzZquTRn8bwVJVy2EhDgxCvCuZsFZyr7taXqKz265WqCsQJozybNJQABzzavL2
c6rtqNATJJS3YyLmc3FdFk/HFIcGYMOOypdp9qZugIalg6LZmtCsio9mGA0iBk5DRmLceBmV+soJ
fwDjXfW8IFy5md55MkbmdWRs/qjzWP2c3sI0CpVF7PGr7fHzYSCfLaueDXC1xZh4gigHMDrjwU9Q
ay5SDhANe99Drumku5XnMDPky0WllHgJNfg32bYWOP0gcwCSbLNg/cB5n51oHXWi5nzP5zXE+4d3
Ffhzcw8aW89IJyJYF2HwRO/PpEAEmPSKmhkgL1cI60iHoLAFs8RrAPMBVj7SlJhuRskFnBxRvHzQ
MUMGbLPHk0mm93gJ
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<md:Extensions xmlns:spid="https://spid.gov.it/saml-extensions">
<spid:SupportedAuthnContextClassRefs>
<AuthnContextClassRef>https://www.spid.gov.it/SpidL1</AuthnContextClassRef>
<AuthnContextClassRef>https://www.spid.gov.it/SpidL2</AuthnContextClassRef>
<AuthnContextClassRef>https://www.spid.gov.it/SpidL3</AuthnContextClassRef>
</spid:SupportedAuthnContextClassRefs>
<spid:SupportedPurposes>
<Purpose>P</Purpose>
</spid:SupportedPurposes>
</md:Extensions>
<md:IDPSSODescriptor WantAuthnRequestsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIIJKTCCBxGgAwIBAgIIJza0JRXSeRwwDQYJKoZIhvcNAQENBQAwgfsxCzAJBgNVBAYTAklUMQ0wCwYDVQQHDARSb21lMSYwJAYDVQQKDB1BZ2VuemlhIHBlciBsJ0l0YWxpYSBEaWdpdGFsZTEwMC4GA1UECwwnU2Vydml6aW8gQWNjcmVkaXRhbWVudG8gZSBwcm9nZXR0byBTUElEMTwwOgYDVQQDDDNQcm9nZXR0byBTUElEIC0gR2VzdG9yaSBkaSBJZGVudGl0w6AgRGlnaXRhbGUgKElkUCkxKTAnBgkqhkiG9w0BCQEWGnByb3RvY29sbG9AcGVjLmFnaWQuZ292Lml0MRowGAYDVQQFExFWQVRJVC05NzczNTAyMDU4NDAeFw0yMzAyMTcwMDAwMDBaFw0zMzAyMTYyMzU5NTlaMIGcMQswCQYDVQQGEwJJVDEQMA4GA1UECAwHQ2F0YW5pYTEQMA4GA1UEBwwHQ2F0YW5pYTEcMBoGA1UECgwTRXRuYUhpdGVjaCBTLkMucC5BLjESMBAGA1UEAwwJaWQuZWh0LmV1MRowGAYDVQRhDBFWQVRJVC0wNDMyMzIxMDg3NDEbMBkGA1UEUwwSaHR0cHM6Ly9pZC5laHQuZXUvMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1JqeZUoCMKUh/Wm1X5NhvWQy2Kbp1uAAoJOmaBdR8ud2axp9Y+QABDcTVgDYgHG8o7AjOQWnPWz9LDvfzswu1CB3idEcg1cSiYVvphTMfmN62q+1Hsuxvc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Qay5SDhANe99Drumku5XnMDPky0WllHgJNfg32bYWOP0gcwCSbLNg/cB5n51oHXWi5nzP5zXE+4d3Ffhzcw8aW89IJyJYF2HwRO/PpEAEmPSKmhkgL1cI60iHoLAFs8RrAPMBVj7SlJhuRskFnBxRvHzQMUMGbLPHk0mm93gJ</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</md:KeyDescriptor>
<md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://id.eht.eu/SLS"/>
<md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://id.eht.eu/SLS"/>
<md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</md:NameIDFormat>
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://id.eht.eu/SSO"/>
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://id.eht.eu/SSO"/>
<saml2:Attribute Name="address" xsi:type="xsi:string"/>
<saml2:Attribute Name="companyName" xsi:type="xsi:string"/>
<saml2:Attribute Name="countyOfBirth" xsi:type="xsi:string"/>
<saml2:Attribute Name="dateOfBirth" xsi:type="xsi:date"/>
<saml2:Attribute Name="digitalAddress" xsi:type="xsi:string"/>
<saml2:Attribute Name="email" xsi:type="xsi:string"/>
<saml2:Attribute Name="expirationDate" xsi:type="xsi:date"/>
<saml2:Attribute Name="familyName" xsi:type="xsi:string"/>
<saml2:Attribute Name="fiscalNumber" xsi:type="xsi:string"/>
<saml2:Attribute Name="gender" xsi:type="xsi:string"/>
<saml2:Attribute Name="idCard" xsi:type="xsi:string"/>
<saml2:Attribute Name="ivaCode" xsi:type="xsi:string"/>
<saml2:Attribute Name="mobilePhone" xsi:type="xsi:string"/>
<saml2:Attribute Name="name" xsi:type="xsi:string"/>
<saml2:Attribute Name="placeOfBirth" xsi:type="xsi:string"/>
<saml2:Attribute Name="registeredOffice" xsi:type="xsi:string"/>
<saml2:Attribute Name="spidCode" xsi:type="xsi:string"/>
<saml2:Attribute Name="companyFiscalNumber" xsi:type="xsi:string"/>
<saml2:Attribute Name="domicileStreetAddress" xsi:type="xsi:string"/>
<saml2:Attribute Name="domicileMunicipality" xsi:type="xsi:string"/>
<saml2:Attribute Name="domicilePostalCode" xsi:type="xsi:string"/>
<saml2:Attribute Name="domicileProvince" xsi:type="xsi:string"/>
<saml2:Attribute Name="domicileNation" xsi:type="xsi:string"/>
</md:IDPSSODescriptor>
<md:Organization>
<md:OrganizationName xml:lang="it">EtnaHitech S.C.p.A.</md:OrganizationName>
<md:OrganizationName xml:lang="en">EtnaHitech S.C.p.A.</md:OrganizationName>
<md:OrganizationDisplayName xml:lang="it">EHT</md:OrganizationDisplayName>
<md:OrganizationDisplayName xml:lang="en">EHT</md:OrganizationDisplayName>
<md:OrganizationURL xml:lang="it">https://www.eht.eu/</md:OrganizationURL>
<md:OrganizationURL xml:lang="en">https://www.eht.eu/</md:OrganizationURL>
</md:Organization>
</md:EntityDescriptor>
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Tags: spid, italia, sistema, pubblico, identità, digitale, login, sistema pubbl
Requires at least: 4.8
Requires PHP: 7
Tested up to: 6.1
Version: 2.5.2
Stable tag: 2.5.2
Version: 2.6
Stable tag: 2.6
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -49,6 +49,11 @@ https://www.youtube.com/watch?v=2UNAtVjFFAs
== Changelog ==
> Backup your data before upgrade.

= 2.6 20230508 =
* [NEW] Added EtnaID IDP
* [BUGFIX] Minor css/code refactoring
* [BUGFIX] Minor bugfix

= 2.5 20221105 =
* [NEW] Added TeamSystem IDP
* [NEW] Improved wp-login.php UI/UX with 2 columns-layout
Expand Down
15 changes: 10 additions & 5 deletions wp-spid-italia.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: WP SPID Italia
Description: SPID - Sistema Pubblico di Identità Digitale
Author: Marco Milesi
Version: 2.5.2
Version: 2.6
Author URI: http://www.marcomilesi.com
*/

Expand Down Expand Up @@ -176,9 +176,15 @@ function spid_get_metadata_token() {
return $token;
}

add_filter( 'login_message', function( $message ) {
spid_handle();
});
add_action('init', function() {
if ( isset( $_GET['spid_sso'] ) && $_GET['spid_sso'] == 'in' ) {
spid_handle();
} else if ( isset( $_GET['spid_sso'] ) && $_GET['spid_sso'] == 'out' ) {
spid_handle();
}
} );

add_filter( 'login_message', function( $message ) { spid_handle(); });

function spid_handle() {
$internal_debug = false;
Expand Down Expand Up @@ -249,7 +255,6 @@ function spid_errors( $errorMsg2 ){
}

if ( isset( $_GET['spid_sso'] ) && $_GET['spid_sso'] == 'out' ) {

wp_clear_auth_cookie();
remove_action('login_footer', 'wp_shake_js', 12);
add_filter( 'login_errors', function() { return 'Disconnesso da SPID'; } );
Expand Down

0 comments on commit 47ad9ce

Please sign in to comment.