Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup, doc, cie button #256

Merged
merged 11 commits into from
Sep 21, 2024
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,18 @@ server {
index index.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
}

location /myservice/ {
alias /var/www/spid-cie-php/vendor/simplesamlphp/simplesamlphp/www/;
index index.php;
location ~ \.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
try_files $fastcgi_script_name =404;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
location ~ ^(?<prefix>/myservice)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
fastcgi_param SCRIPT_FILENAME $document_root$phpfile;
fastcgi_param PATH_INFO $pathinfo if_not_empty;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
include fastcgi_params;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"config": {
"version": "3.18.6",
"version": "3.18.7",
"allow-plugins": {
"simplesamlphp/composer-module-installer": true
}
Expand Down
17 changes: 12 additions & 5 deletions setup/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public static function setup(Event $event) {
$_fpaProvincia = "";
$_fpaNazione = "IT";
$_fpaOrganizationName = "";
$_fpaOrganizationEmailAddress = "";
$_fpaOrganizationTelephoneNumber = "";
$_fpaOrganizationEmailAddress = "info@organization.org"; // must be not null otherwise an error is raised in authentication
$_fpaOrganizationTelephoneNumber = "+3912345678"; // must be not null otherwise an error is raised in authentication

$config = file_exists("spid-php-setup.json") ?
json_decode(file_get_contents("spid-php-setup.json"), true) : array();
Expand Down Expand Up @@ -1013,12 +1013,19 @@ public static function setup(Event $event) {
} catch(Exception $e) {
$symlink_manual_creation_command= "WARNING! At the end of the installation execute as administrator this command:\n$mklink_cmd";
}

} else {
// linux
symlink($cmd_target, $cmd_link);
if (is_link($cmd_link)) {
if (readlink($cmd_link) != $cmd_target) {
$symlink_manual_creation_command= "WARNING! At the end of the installation check the symbolic link at $cmd_link, it must link to $cmd_target";
}
}
else {
symlink($cmd_target, $cmd_link);
}
}

if ($symlink_manual_creation_command === false) {
echo $colors->getColoredString("OK", "green");
} else {
Expand Down
22 changes: 10 additions & 12 deletions setup/sdk/spid-php.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -532,18 +532,16 @@
return $button_li;
}

public function insertCIEButton($size='default') {
echo "
<div class=\"cie-button\" style=\"width: 280px;\">
<a class=\"cie-button\" role=\"button\"
href=\"?idp=CIE TEST\" >
<span class=\"cie-button-icon\">
<img aria-hidden=\"true\" src=\"/{{SERVICENAME}}/cie-graphics/SVG/entra_con_cie.svg\" alt=\"Entra con CIE\" />
</span>
<span class=\"sr-only\" style=\"display:none\">Entra con CIE</span>
</a>
</div>
";
public function insertCIEButton($size = 'L') {
$size = strtolower($size);
if ($size == 'default') {
$size = 'l';
}

echo "<a href=\"?idp=CIE TEST\" class=\"italia-it-button italia-it-button-size-$size button-cie\" aria-haspopup=\"true\" aria-expanded=\"false\">
<img src=\"/{{SERVICENAME}}/cie-graphics/SVG/entra_con_cie.svg\" alt=\"Entra con CIE\" />
<span class=\"sr-only\" style=\"display:none\">Entra con CIE</span>
</a>";
}
}

Expand Down
Loading