Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • perun/perun-proxyidp/v1/simplesamlphp-module-elixir
1 result
Show changes
Commits on Source (6)
## [6.0.1](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-elixir/compare/v6.0.0...v6.0.1) (2022-12-13)
### Bug Fixes
* 🐛 Reworked how Jurisdiction is read ([b5af950](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-elixir/commit/b5af9500b987c1360aca92eb70d35c60753024cb))
# [6.0.0](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-elixir/compare/v5.1.5...v6.0.0) (2022-11-28)
......
......@@ -105,11 +105,11 @@
},
{
"name": "cesnet/simplesamlphp-module-perun",
"version": "v9.0.4",
"version": "v9.0.5",
"source": {
"type": "git",
"url": "https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-perun.git",
"reference": "25addac1306322f9e43b9d3b15da3f0fb987dabb"
"reference": "5f1d0deb7eedb22d1d2307a2aa5bb3c2827a9300"
},
"require": {
"cesnet/simplesamlphp-module-authswitcher": "^10.6",
......@@ -153,7 +153,7 @@
"perun",
"simplesamlphp"
],
"time": "2022-11-03T23:02:24+00:00"
"time": "2022-11-29T18:04:02+00:00"
},
{
"name": "cesnet/simplesamlphp-module-proxystatistics",
......@@ -3008,16 +3008,16 @@
},
{
"name": "simplesamlphp/twig-configurable-i18n",
"version": "v2.3.4",
"version": "v2.3.5",
"source": {
"type": "git",
"url": "https://github.com/simplesamlphp/twig-configurable-i18n.git",
"reference": "e2bffc7eed3112a0b3870ef5b4da0fd74c7c4b8a"
"reference": "1dc0ff69ec1dfb4cab6a30c583b59faf0efc27d6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/simplesamlphp/twig-configurable-i18n/zipball/e2bffc7eed3112a0b3870ef5b4da0fd74c7c4b8a",
"reference": "e2bffc7eed3112a0b3870ef5b4da0fd74c7c4b8a",
"url": "https://api.github.com/repos/simplesamlphp/twig-configurable-i18n/zipball/1dc0ff69ec1dfb4cab6a30c583b59faf0efc27d6",
"reference": "1dc0ff69ec1dfb4cab6a30c583b59faf0efc27d6",
"shasum": ""
},
"require": {
......@@ -3029,7 +3029,7 @@
"sensiolabs/security-checker": "~6.0.3",
"simplesamlphp/simplesamlphp-test-framework": "~0.1.2",
"squizlabs/php_codesniffer": "^3.5",
"twig/twig": "^2.13"
"twig/twig": "^2.15.3"
},
"type": "project",
"autoload": {
......@@ -3060,7 +3060,7 @@
"issues": "https://github.com/simplesamlphp/twig-configurable-i18n/issues",
"source": "https://github.com/simplesamlphp/twig-configurable-i18n"
},
"time": "2020-08-27T12:51:10+00:00"
"time": "2022-11-28T16:34:29+00:00"
},
{
"name": "spomky-labs/base64url",
......@@ -3384,16 +3384,16 @@
},
{
"name": "symfony/console",
"version": "v5.4.15",
"version": "v5.4.16",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669"
"reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/ea59bb0edfaf9f28d18d8791410ee0355f317669",
"reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669",
"url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef",
"reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef",
"shasum": ""
},
"require": {
......@@ -3463,7 +3463,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.4.15"
"source": "https://github.com/symfony/console/tree/v5.4.16"
},
"funding": [
{
......@@ -3479,20 +3479,20 @@
"type": "tidelift"
}
],
"time": "2022-10-26T21:41:52+00:00"
"time": "2022-11-25T14:09:27+00:00"
},
{
"name": "symfony/dependency-injection",
"version": "v5.4.13",
"version": "v5.4.16",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "24cf522668845391c0542bc1de496366072a6d0e"
"reference": "a93e1863500940780fc1235f52d54397be2d14b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/24cf522668845391c0542bc1de496366072a6d0e",
"reference": "24cf522668845391c0542bc1de496366072a6d0e",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a93e1863500940780fc1235f52d54397be2d14b3",
"reference": "a93e1863500940780fc1235f52d54397be2d14b3",
"shasum": ""
},
"require": {
......@@ -3552,7 +3552,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dependency-injection/tree/v5.4.13"
"source": "https://github.com/symfony/dependency-injection/tree/v5.4.16"
},
"funding": [
{
......@@ -3568,7 +3568,7 @@
"type": "tidelift"
}
],
"time": "2022-08-30T19:10:13+00:00"
"time": "2022-11-25T07:33:13+00:00"
},
{
"name": "symfony/deprecation-contracts",
......@@ -4001,16 +4001,16 @@
},
{
"name": "symfony/framework-bundle",
"version": "v5.4.14",
"version": "v5.4.16",
"source": {
"type": "git",
"url": "https://github.com/symfony/framework-bundle.git",
"reference": "00ac4d7e31597f6a49759bd925d83fc87d4ade68"
"reference": "70bfb2e76b8d97b2b19058bd65046b4cc1f04e3d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/framework-bundle/zipball/00ac4d7e31597f6a49759bd925d83fc87d4ade68",
"reference": "00ac4d7e31597f6a49759bd925d83fc87d4ade68",
"url": "https://api.github.com/repos/symfony/framework-bundle/zipball/70bfb2e76b8d97b2b19058bd65046b4cc1f04e3d",
"reference": "70bfb2e76b8d97b2b19058bd65046b4cc1f04e3d",
"shasum": ""
},
"require": {
......@@ -4132,7 +4132,7 @@
"description": "Provides a tight integration between Symfony components and the Symfony full-stack framework",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/framework-bundle/tree/v5.4.14"
"source": "https://github.com/symfony/framework-bundle/tree/v5.4.16"
},
"funding": [
{
......@@ -4148,20 +4148,20 @@
"type": "tidelift"
}
],
"time": "2022-10-07T08:01:20+00:00"
"time": "2022-11-25T14:26:10+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v5.4.15",
"version": "v5.4.16",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "75bd663ff2db90141bfb733682459d5bbe9e29c3"
"reference": "5032c5849aef24741e1970cb03511b0dd131d838"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/75bd663ff2db90141bfb733682459d5bbe9e29c3",
"reference": "75bd663ff2db90141bfb733682459d5bbe9e29c3",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/5032c5849aef24741e1970cb03511b0dd131d838",
"reference": "5032c5849aef24741e1970cb03511b0dd131d838",
"shasum": ""
},
"require": {
......@@ -4208,7 +4208,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.15"
"source": "https://github.com/symfony/http-foundation/tree/v5.4.16"
},
"funding": [
{
......@@ -4224,20 +4224,20 @@
"type": "tidelift"
}
],
"time": "2022-10-12T09:43:19+00:00"
"time": "2022-11-07T08:06:40+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v5.4.15",
"version": "v5.4.16",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "fc63c8c3e1036d424820cc993a4ea163778dc5c7"
"reference": "b432c57c5de73634b1859093c1f58e3cd84455a1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/fc63c8c3e1036d424820cc993a4ea163778dc5c7",
"reference": "fc63c8c3e1036d424820cc993a4ea163778dc5c7",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/b432c57c5de73634b1859093c1f58e3cd84455a1",
"reference": "b432c57c5de73634b1859093c1f58e3cd84455a1",
"shasum": ""
},
"require": {
......@@ -4320,7 +4320,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.4.15"
"source": "https://github.com/symfony/http-kernel/tree/v5.4.16"
},
"funding": [
{
......@@ -4336,7 +4336,7 @@
"type": "tidelift"
}
],
"time": "2022-10-28T17:52:18+00:00"
"time": "2022-11-28T18:08:58+00:00"
},
{
"name": "symfony/polyfill-ctype",
......@@ -5408,16 +5408,16 @@
},
{
"name": "symfony/yaml",
"version": "v5.4.14",
"version": "v5.4.16",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "e83fe9a72011f07c662da46a05603d66deeeb487"
"reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/e83fe9a72011f07c662da46a05603d66deeeb487",
"reference": "e83fe9a72011f07c662da46a05603d66deeeb487",
"url": "https://api.github.com/repos/symfony/yaml/zipball/ebd37c71f62d5ec5f6e27de3e06fee492d4c6298",
"reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298",
"shasum": ""
},
"require": {
......@@ -5463,7 +5463,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v5.4.14"
"source": "https://github.com/symfony/yaml/tree/v5.4.16"
},
"funding": [
{
......@@ -5479,7 +5479,7 @@
"type": "tidelift"
}
],
"time": "2022-10-03T15:15:50+00:00"
"time": "2022-11-25T16:04:03+00:00"
},
{
"name": "twig/extensions",
......
......@@ -5,54 +5,60 @@ namespace SimpleSAML\Module\elixir;
class ConsentHelper
{
private const EU_EAA = [
'AT' => 'Austria',
'BE' => 'Belgium',
'BG' => 'Bulgaria',
'HR' => 'Croatia',
'CY' => 'Cyprus',
'CZ' => 'Czech Republic',
'DK' => 'Denmark',
'EE' => 'Estonia',
'FI' => 'Finland',
'FR' => 'France',
'DE' => 'Germany',
'EL' => 'Greece',
'HU' => 'Hungary',
'IE' => 'Ireland',
'IT' => 'Italy',
'LV' => 'Latvia',
'LT' => 'Lithuania',
'LU' => 'Luxembourg',
'MT' => 'Malta',
'NL' => 'Netherlands',
'PT' => 'Portugal',
'RO' => 'Romania',
'SK' => 'Slovakia',
'SI' => 'Slovenia',
'ES' => 'Spain',
'SE' => 'Sweden',
'NO' => 'Norway',
'IS' => 'Iceland',
'LI' => 'Liechtenstein',
'GB' => 'United Kingdom',
'AUT' => 'Austria',
'BEL' => 'Belgium',
'BGR' => 'Bulgaria',
'HRV' => 'Croatia',
'CYP' => 'Cyprus',
'CZE' => 'Czech Republic',
'DNK' => 'Denmark',
'EST' => 'Estonia',
'FIN' => 'Finland',
'FRA' => 'France',
'DEU' => 'Germany',
'GRC' => 'Greece',
'HUN' => 'Hungary',
'IRL' => 'Ireland',
'ITA' => 'Italy',
'LVA' => 'Latvia',
'LTU' => 'Lithuania',
'LUX' => 'Luxembourg',
'MLT' => 'Malta',
'NLD' => 'Netherlands',
'PRT' => 'Portugal',
'ROU' => 'Romania',
'SVK' => 'Slovakia',
'SVN' => 'Slovenia',
'ESP' => 'Spain',
'SWE' => 'Sweden',
'NOR' => 'Norway',
'ISL' => 'Iceland',
'LIE' => 'Liechtenstein',
'GBR' => 'United Kingdom',
];
private const JURISDICTION_INTERNATIONAL_ORG = 'International organisation';
private const JURISDICTION_EMBL = 'EMBL intergovernmental organisation';
public function __construct()
{
}
public static function getJurisdiction($dstMetadata): string
{
$countryCodes = json_decode(file_get_contents('http://country.io/names.json'), true);
$jurisdiction = empty($dstMetadata['jurisdiction']) ? '' : $dstMetadata['jurisdiction'];
if (empty($jurisdiction) || array_key_exists($jurisdiction, self::EU_EAA)) {
return '';
}
if ('INT' === $jurisdiction || 'EMBL' === $jurisdiction) {
$pattern = "/\(\K[A-Z]{3}/";
$jurisdictionCode = preg_match($pattern, $jurisdiction, $out) ? $out[0] : $jurisdiction;
if (
self::JURISDICTION_INTERNATIONAL_ORG === $jurisdictionCode
|| self::JURISDICTION_EMBL === $jurisdictionCode
) {
return $jurisdiction;
} elseif (empty($jurisdictionCode) || array_key_exists($jurisdictionCode, self::EU_EAA)) {
return '';
}
return 'in ' . $countryCodes[$jurisdiction];
return 'in ' . $jurisdiction;
}
public static function printUserAttributes(array $attributes, $translator)
......