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/simplesamlphp-module-campusmultiauth
1 result
Show changes
## [1.4.1](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-campusmultiauth/compare/v1.4.0...v1.4.1) (2022-09-28)
### Bug Fixes
* first release from GitLab ([43b7698](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-campusmultiauth/commit/43b76989a589d60404bb47f7d8e80ae5973625ed))
# [1.4.0](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-campusmultiauth/compare/v1.3.0...v1.4.0) (2022-09-24)
......
......@@ -35,7 +35,7 @@ Let's look at the configuration options:
`campusmultiauth:campusidp` defines which module and authentication source to use. This is the only mandatory option.
`userPassSource` is an authentication source to use to authentication with a username and password. For easy integration with any identity provider supporting [ECP](http://docs.oasis-open.org/security/saml/Post2.0/saml-ecp/v2.0/saml-ecp-v2.0.html), see [simplesamlphp-module-campususerpass](https://github.com/melanger/simplesamlphp-module-campususerpass). If the name is not set, `campus-userpass` is used as a default option.
`userPassSource` is an authentication source to use to authentication with a username and password. For easy integration with any identity provider supporting [ECP](http://docs.oasis-open.org/security/saml/Post2.0/saml-ecp/v2.0/saml-ecp-v2.0.html), see [simplesamlphp-module-campususerpass](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-campususerpass). If the name is not set, `campus-userpass` is used as a default option.
`spSource` is an authentication source to use to authentication with an external identity provider. If the name is no set, `default-sp` is used as a default option.
......@@ -43,7 +43,7 @@ Of course, both authsources must be defined in authsources.php file. When the co
## Login page configuration
The second part of the configuration is setting up the login page itself. While doing that, it's highly recommended to follow [our suggestions (Czech only)](https://github.com/CESNET/simplesamlphp-module-campusmultiauth/wiki/Konfigura%C4%8Dn%C3%AD-doporu%C4%8Den%C3%AD). To configure the login page, you need to create a new configuration file `module_campusmultiauth.php`. In this module, there is an example configuration available at `config-templates/module_campusmultiauth.php`. In configuration file, there are following options available:
The second part of the configuration is setting up the login page itself. While doing that, it's highly recommended to follow [our suggestions (Czech only)](https://gitlab.ics.muni.cz/perun-proxy-aai/simplesamlphp/simplesamlphp-module-campusmultiauth/-/wikis/Konfigura%C4%8Dn%C3%AD-doporu%C4%8Den%C3%AD). To configure the login page, you need to create a new configuration file `module_campusmultiauth.php`. In this module, there is an example configuration available at `config-templates/module_campusmultiauth.php`. In configuration file, there are following options available:
`css_framework` - if set to `muni_jvs`, the login page displays in MUNI framework. Otherwise, Bootstrap 5 is used.
......@@ -149,7 +149,7 @@ A service provider can choose which identity provider(s) should user use. If the
## Deployment
The easiest way is to use [docker-campusidp](https://github.com/cesnet/docker-campusidp), which includes this module together with SimpleSAMLphp and PHP-FPM.
The easiest way is to use [docker-campusidp](https://gitlab.ics.muni.cz/perun-proxy-aai/containers/docker-campusidp), which includes this module together with SimpleSAMLphp and PHP-FPM.
If you want to use non-SAML providers (e.g. OAuth or OIDC), you need to provide a bridge. There are multiple ways possible:
......
<?php
declare(strict_types=1);
/**
* An example configuration of the login page
*/
declare(strict_types=1);
$config = [
'components' => [
[
......
......@@ -92,7 +92,8 @@ class Campusidp extends Source
$this->sources = [];
$this->userPassSourceName = !empty($config['userPassSource']['name']) ? $config['userPassSource']['name'] : 'campus-userpass';
$this->userPassSourceName = !empty($config['userPassSource']['name'])
? $config['userPassSource']['name'] : 'campus-userpass';
$userPassClassRef = [];
if (!empty($config['userPassSource']['AuthnContextClassRef'])) {
......@@ -182,10 +183,12 @@ class Campusidp extends Source
$session->setData(self::SESSION_SOURCE, $state[self::AUTHID], $authId, Session::DATA_TIMEOUT_SESSION_END);
try {
if (!empty($_POST['username']) && !empty($_POST['password']) && is_subclass_of(
$as,
'\SimpleSAML\Module\core\Auth\UserPassBase'
)) {
if (
!empty($_POST['username']) && !empty($_POST['password']) && is_subclass_of(
$as,
'\SimpleSAML\Module\core\Auth\UserPassBase'
)
) {
$state[UserPassBase::AUTHID] = $authId;
try {
......@@ -346,14 +349,20 @@ class Campusidp extends Source
case self::ASSURANCE_CERTIFICATION:
$isFirst ?
$result = array_merge($result, self::getAssuranceCertificationIdps($value, $metadata)) :
$result = array_intersect($result, self::getAssuranceCertificationIdps($value, $metadata));
$result = array_intersect(
$result,
self::getAssuranceCertificationIdps($value, $metadata)
);
$isFirst = false;
break;
case self::REGISTRATION_AUTHORITY:
$isFirst ?
$result = array_merge($result, self::getRegistrationAuthorityIdps($value, $metadata)) :
$result = array_intersect($result, self::getRegistrationAuthorityIdps($value, $metadata));
$result = array_intersect(
$result,
self::getRegistrationAuthorityIdps($value, $metadata)
);
$isFirst = false;
break;
default:
......@@ -366,14 +375,26 @@ class Campusidp extends Source
switch ($type) {
case self::ENTITY_CATEGORY:
$isFirst ?
$result = array_merge($result, self::getEntityCategoryIdps([self::CONTAINS => $item], $metadata)) :
$result = array_intersect($result, self::getEntityCategoryIdps([self::CONTAINS => $item], $metadata));
$result = array_merge(
$result,
self::getEntityCategoryIdps([self::CONTAINS => $item], $metadata)
) :
$result = array_intersect(
$result,
self::getEntityCategoryIdps([self::CONTAINS => $item], $metadata)
);
$isFirst = false;
break;
case self::ASSURANCE_CERTIFICATION:
$isFirst ?
$result = array_merge($result, self::getAssuranceCertificationIdps([self::CONTAINS => $item], $metadata)) :
$result = array_intersect($result, self::getAssuranceCertificationIdps([self::CONTAINS => $item], $metadata));
$result = array_merge(
$result,
self::getAssuranceCertificationIdps([self::CONTAINS => $item], $metadata)
) :
$result = array_intersect(
$result,
self::getAssuranceCertificationIdps([self::CONTAINS => $item], $metadata)
);
$isFirst = false;
break;
default:
......@@ -420,16 +441,28 @@ class Campusidp extends Source
foreach ($claim as $item) {
switch ($type) {
case self::ENTITY_CATEGORY:
$result = array_merge($result, self::getEntityCategoryIdps([self::CONTAINS => $item], $metadata));
$result = array_merge(
$result,
self::getEntityCategoryIdps([self::CONTAINS => $item], $metadata)
);
break;
case self::ASSURANCE_CERTIFICATION:
$result = array_merge($result, self::getAssuranceCertificationIdps([self::CONTAINS => $item], $metadata));
$result = array_merge(
$result,
self::getAssuranceCertificationIdps([self::CONTAINS => $item], $metadata)
);
break;
case self::REGISTRATION_AUTHORITY:
$result = array_merge($result, self::getRegistrationAuthorityIdps([self::EQUALS => $item], $metadata));
$result = array_merge(
$result,
self::getRegistrationAuthorityIdps([self::EQUALS => $item], $metadata)
);
break;
case self::ENTITYID:
$result = array_merge($result, self::getEntityidIdp([self::EQUALS => $item], $metadata));
$result = array_merge(
$result,
self::getEntityidIdp([self::EQUALS => $item], $metadata)
);
break;
default:
break;
......@@ -446,10 +479,16 @@ class Campusidp extends Source
switch (array_key_first($claim)) {
case self::ALL_OF:
$result = array_merge($result, self::getAllOfIdps($claim[self::ALL_OF], $metadata, self::ENTITY_CATEGORY));
$result = array_merge(
$result,
self::getAllOfIdps($claim[self::ALL_OF], $metadata, self::ENTITY_CATEGORY)
);
break;
case self::ANY_OF:
$result = array_merge($result, self::getAnyOfIdps($claim[self::ANY_OF], $metadata, self::ENTITY_CATEGORY));
$result = array_merge(
$result,
self::getAnyOfIdps($claim[self::ANY_OF], $metadata, self::ENTITY_CATEGORY)
);
break;
case self::CONTAINS:
foreach ($metadata as $entityid => $idpMetadata) {
......@@ -473,10 +512,16 @@ class Campusidp extends Source
switch (array_key_first($claim)) {
case self::ALL_OF:
$result = array_merge($result, self::getAllOfIdps($claim[self::ALL_OF], $metadata, self::ASSURANCE_CERTIFICATION));
$result = array_merge(
$result,
self::getAllOfIdps($claim[self::ALL_OF], $metadata, self::ASSURANCE_CERTIFICATION)
);
break;
case self::ANY_OF:
$result = array_merge($result, self::getAnyOfIdps($claim[self::ANY_OF], $metadata, self::ASSURANCE_CERTIFICATION));
$result = array_merge(
$result,
self::getAnyOfIdps($claim[self::ANY_OF], $metadata, self::ASSURANCE_CERTIFICATION)
);
break;
case self::CONTAINS:
foreach ($metadata as $entityid => $idpMetadata) {
......@@ -500,20 +545,27 @@ class Campusidp extends Source
switch (array_key_first($claim)) {
case self::ANY_OF:
$result = array_merge($result, self::getAnyOfIdps($claim[self::ANY_OF], $metadata, self::REGISTRATION_AUTHORITY));
$result = array_merge(
$result,
self::getAnyOfIdps($claim[self::ANY_OF], $metadata, self::REGISTRATION_AUTHORITY)
);
break;
case self::EQUALS:
foreach ($metadata as $entityid => $idpMetadata) {
if (!empty($idpMetadata['RegistrationInfo']['registrationAuthority']) &&
self::equals($idpMetadata['RegistrationInfo']['registrationAuthority'], $claim[self::EQUALS])) {
if (
!empty($idpMetadata['RegistrationInfo']['registrationAuthority']) &&
self::equals($idpMetadata['RegistrationInfo']['registrationAuthority'], $claim[self::EQUALS])
) {
$result[] = $entityid;
}
}
break;
case self::MATCHES:
foreach ($metadata as $entityid => $idpMetadata) {
if (!empty($idpMetadata['RegistrationInfo']['registrationAuthority']) &&
self::matches($idpMetadata['RegistrationInfo']['registrationAuthority'], $claim[self::MATCHES])) {
if (
!empty($idpMetadata['RegistrationInfo']['registrationAuthority']) &&
self::matches($idpMetadata['RegistrationInfo']['registrationAuthority'], $claim[self::MATCHES])
) {
$result[] = $entityid;
}
}
......@@ -701,11 +753,13 @@ class Campusidp extends Source
$endColComponent = -1;
for ($i = 0; $i < count($config['components']); $i++) {
if ($config['components'][$i]['name'] === 'local_login' && in_array(
$config['components'][$i]['entityid'],
$idphint,
true
)) {
if (
$config['components'][$i]['name'] === 'local_login' && in_array(
$config['components'][$i]['entityid'],
$idphint,
true
)
) {
$componentsToDisplay[] = $i;
}
......@@ -749,33 +803,41 @@ class Campusidp extends Source
foreach ($metadata as $entityid => $idpentry) {
if (!empty($idpentry['name']) && is_array($idpentry['name'])) {
foreach ($idpentry['name'] as $key => $value) {
if (str_contains(
$transliterator->transliterate($value),
$transliterator->transliterate($searchTerm)
)) {
if (
str_contains(
$transliterator->transliterate($value),
$transliterator->transliterate($searchTerm)
)
) {
$filteredMetadata[$entityid] = $idpentry;
break;
}
}
}
if (!in_array($idpentry, $filteredMetadata, true) && !empty($idpentry['description']) && is_array(
$idpentry['description']
)) {
if (
!in_array($idpentry, $filteredMetadata, true) && !empty($idpentry['description']) && is_array(
$idpentry['description']
)
) {
foreach ($idpentry['description'] as $key => $value) {
if (str_contains(
$transliterator->transliterate($value),
$transliterator->transliterate($searchTerm)
)) {
if (
str_contains(
$transliterator->transliterate($value),
$transliterator->transliterate($searchTerm)
)
) {
$filteredMetadata[$entityid] = $idpentry;
break;
}
}
}
if (!in_array($idpentry, $filteredMetadata, true) && !empty($idpentry['url']) && is_array(
$idpentry['url']
)) {
if (
!in_array($idpentry, $filteredMetadata, true) && !empty($idpentry['url']) && is_array(
$idpentry['url']
)
) {
foreach ($idpentry['url'] as $key => $value) {
if (str_contains(strtolower($value), strtolower($searchTerm))) {
$filteredMetadata[$entityid] = $idpentry;
......
......@@ -5,7 +5,7 @@
"packages": {
"": {
"dependencies": {
"@perun-proxy-aai/semantic-release-proxy-config": "^1.0.0"
"@perun-proxy-aai/semantic-release-proxy-config": "^1.0.3"
}
},
"node_modules/@babel/code-frame": {
......@@ -109,6 +109,7 @@
"resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
"integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
"optional": true,
"peer": true,
"engines": {
"node": ">=0.1.90"
}
......@@ -347,23 +348,20 @@
}
},
"node_modules/@perun-proxy-aai/semantic-release-proxy-config": {
"version": "1.0.0",
"resolved": "https://gitlab.ics.muni.cz/api/v4/projects/4411/packages/npm/@perun-proxy-aai/semantic-release-proxy-config/-/@perun-proxy-aai/semantic-release-proxy-config-1.0.0.tgz",
"integrity": "sha1-LHCQ/9rXmGFObDPFOWwyQYmbLsU=",
"version": "1.0.3",
"resolved": "https://gitlab.ics.muni.cz/api/v4/projects/4411/packages/npm/@perun-proxy-aai/semantic-release-proxy-config/-/@perun-proxy-aai/semantic-release-proxy-config-1.0.3.tgz",
"integrity": "sha1-GDBtohB2JD6tF8rEwHDuqFPwJyE=",
"dependencies": {
"@eclass/semantic-release-sentry-releases": "^3.0.0",
"@google/semantic-release-replace-plugin": "^1.1.0",
"@perun-proxy-aai/semantic-release-proxy-config": "^1.0.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/exec": "^6.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^9.4.2",
"@semantic-release/gitlab-config": "^10.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"semantic-release-pypi": "^2.5.0"
},
"engines": {
"node": "^14.17 || ^16"
"@semantic-release/release-notes-generator": "^10.0.3"
},
"peerDependencies": {
"semantic-release": ">=19.0.0"
......@@ -415,29 +413,24 @@
}
},
"node_modules/@semantic-release/exec": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@semantic-release/exec/-/exec-5.0.0.tgz",
"integrity": "sha512-t7LWXIvDJQbuGCy2WmMG51WyaGSLTvZBv9INvcI4S0kn+QjnnVVUMhcioIqhb0r3yqqarMzHVcABFug0q0OXjw==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/@semantic-release/exec/-/exec-6.0.3.tgz",
"integrity": "sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==",
"dependencies": {
"@semantic-release/error": "^2.1.0",
"@semantic-release/error": "^3.0.0",
"aggregate-error": "^3.0.0",
"debug": "^4.0.0",
"execa": "^4.0.0",
"execa": "^5.0.0",
"lodash": "^4.17.4",
"parse-json": "^5.0.0"
},
"engines": {
"node": ">=10.18"
"node": ">=14.17"
},
"peerDependencies": {
"semantic-release": ">=16.0.0 <18.0.0"
"semantic-release": ">=18.0.0"
}
},
"node_modules/@semantic-release/exec/node_modules/@semantic-release/error": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-2.2.0.tgz",
"integrity": "sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg=="
},
"node_modules/@semantic-release/git": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/@semantic-release/git/-/git-10.0.1.tgz",
......@@ -459,36 +452,6 @@
"semantic-release": ">=18.0.0"
}
},
"node_modules/@semantic-release/git/node_modules/execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"dependencies": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/@semantic-release/git/node_modules/human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"engines": {
"node": ">=10.17.0"
}
},
"node_modules/@semantic-release/github": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-8.0.6.tgz",
......@@ -615,28 +578,6 @@
"semantic-release": ">=19.0.0"
}
},
"node_modules/@semantic-release/npm/node_modules/execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"dependencies": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/@semantic-release/npm/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
......@@ -650,14 +591,6 @@
"node": ">=12"
}
},
"node_modules/@semantic-release/npm/node_modules/human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"engines": {
"node": ">=10.17.0"
}
},
"node_modules/@semantic-release/release-notes-generator": {
"version": "10.0.3",
"resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-10.0.3.tgz",
......@@ -1102,6 +1035,7 @@
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz",
"integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==",
"peer": true,
"dependencies": {
"string-width": "^4.2.0"
},
......@@ -1502,38 +1436,6 @@
"node": ">=10.17"
}
},
"node_modules/env-ci/node_modules/execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"peer": true,
"dependencies": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/env-ci/node_modules/human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"peer": true,
"engines": {
"node": ">=10.17.0"
}
},
"node_modules/error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
......@@ -1600,18 +1502,18 @@
}
},
"node_modules/execa": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"dependencies": {
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"signal-exit": "^3.0.2",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
},
"engines": {
......@@ -1621,29 +1523,6 @@
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/execa/node_modules/get-stream": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
"dependencies": {
"pump": "^3.0.0"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/execa/node_modules/pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"node_modules/fast-glob": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
......@@ -2102,11 +1981,11 @@
}
},
"node_modules/human-signals": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"engines": {
"node": ">=8.12.0"
"node": ">=10.17.0"
}
},
"node_modules/ignore": {
......@@ -5286,6 +5165,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
"integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
"peer": true,
"engines": {
"node": ">=6"
}
......@@ -5892,61 +5772,6 @@
"node": ">=16 || ^14.17"
}
},
"node_modules/semantic-release-pypi": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/semantic-release-pypi/-/semantic-release-pypi-2.5.0.tgz",
"integrity": "sha512-ZQX8OAH696uSRhAfqbteus+JpxO6kLflD1Ewgp0/yOppTBX4Zky2LFgTTKBn+ncWe+NHlnSK5Kov9ow+L+nfTw==",
"dependencies": {
"execa": "^4.1.0",
"form-data": "^3.0.0",
"got": "^11.8.0"
}
},
"node_modules/semantic-release-pypi/node_modules/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/semantic-release/node_modules/execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"peer": true,
"dependencies": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/semantic-release/node_modules/human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"peer": true,
"engines": {
"node": ">=10.17.0"
}
},
"node_modules/semantic-release/node_modules/yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
......@@ -6821,7 +6646,8 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
"integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
"optional": true
"optional": true,
"peer": true
},
"@eclass/semantic-release-sentry-releases": {
"version": "3.0.0",
......@@ -7004,20 +6830,20 @@
}
},
"@perun-proxy-aai/semantic-release-proxy-config": {
"version": "1.0.0",
"resolved": "https://gitlab.ics.muni.cz/api/v4/projects/4411/packages/npm/@perun-proxy-aai/semantic-release-proxy-config/-/@perun-proxy-aai/semantic-release-proxy-config-1.0.0.tgz",
"integrity": "sha1-LHCQ/9rXmGFObDPFOWwyQYmbLsU=",
"version": "1.0.3",
"resolved": "https://gitlab.ics.muni.cz/api/v4/projects/4411/packages/npm/@perun-proxy-aai/semantic-release-proxy-config/-/@perun-proxy-aai/semantic-release-proxy-config-1.0.3.tgz",
"integrity": "sha1-GDBtohB2JD6tF8rEwHDuqFPwJyE=",
"requires": {
"@eclass/semantic-release-sentry-releases": "^3.0.0",
"@google/semantic-release-replace-plugin": "^1.1.0",
"@perun-proxy-aai/semantic-release-proxy-config": "^1.0.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/exec": "^6.0.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^9.4.2",
"@semantic-release/gitlab-config": "^10.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"semantic-release-pypi": "^2.5.0"
"@semantic-release/release-notes-generator": "^10.0.3"
}
},
"@semantic-release/changelog": {
......@@ -7051,23 +6877,16 @@
"integrity": "sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw=="
},
"@semantic-release/exec": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@semantic-release/exec/-/exec-5.0.0.tgz",
"integrity": "sha512-t7LWXIvDJQbuGCy2WmMG51WyaGSLTvZBv9INvcI4S0kn+QjnnVVUMhcioIqhb0r3yqqarMzHVcABFug0q0OXjw==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/@semantic-release/exec/-/exec-6.0.3.tgz",
"integrity": "sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==",
"requires": {
"@semantic-release/error": "^2.1.0",
"@semantic-release/error": "^3.0.0",
"aggregate-error": "^3.0.0",
"debug": "^4.0.0",
"execa": "^4.0.0",
"execa": "^5.0.0",
"lodash": "^4.17.4",
"parse-json": "^5.0.0"
},
"dependencies": {
"@semantic-release/error": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-2.2.0.tgz",
"integrity": "sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg=="
}
}
},
"@semantic-release/git": {
......@@ -7083,29 +6902,6 @@
"lodash": "^4.17.4",
"micromatch": "^4.0.0",
"p-reduce": "^2.0.0"
},
"dependencies": {
"execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"requires": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
}
},
"human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
}
}
},
"@semantic-release/github": {
......@@ -7208,22 +7004,6 @@
"tempy": "^1.0.0"
},
"dependencies": {
"execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"requires": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
}
},
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
......@@ -7233,11 +7013,6 @@
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
}
}
},
......@@ -7592,6 +7367,7 @@
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz",
"integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==",
"peer": true,
"requires": {
"@colors/colors": "1.5.0",
"string-width": "^4.2.0"
......@@ -7889,31 +7665,6 @@
"execa": "^5.0.0",
"fromentries": "^1.3.2",
"java-properties": "^1.0.0"
},
"dependencies": {
"execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"peer": true,
"requires": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
}
},
"human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"peer": true
}
}
},
"error-ex": {
......@@ -7965,38 +7716,19 @@
}
},
"execa": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"requires": {
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"signal-exit": "^3.0.2",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
},
"dependencies": {
"get-stream": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
"requires": {
"pump": "^3.0.0"
}
},
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
}
}
},
"fast-glob": {
......@@ -8354,9 +8086,9 @@
}
},
"human-signals": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw=="
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
},
"ignore": {
"version": "5.2.0",
......@@ -10533,7 +10265,8 @@
"p-map": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
"integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw=="
"integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
"peer": true
},
"p-reduce": {
"version": "2.1.0",
......@@ -10975,29 +10708,6 @@
"yargs": "^16.2.0"
},
"dependencies": {
"execa": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
"integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
"peer": true,
"requires": {
"cross-spawn": "^7.0.3",
"get-stream": "^6.0.0",
"human-signals": "^2.1.0",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.1",
"onetime": "^5.1.2",
"signal-exit": "^3.0.3",
"strip-final-newline": "^2.0.0"
}
},
"human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"peer": true
},
"yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
......@@ -11015,28 +10725,6 @@
}
}
},
"semantic-release-pypi": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/semantic-release-pypi/-/semantic-release-pypi-2.5.0.tgz",
"integrity": "sha512-ZQX8OAH696uSRhAfqbteus+JpxO6kLflD1Ewgp0/yOppTBX4Zky2LFgTTKBn+ncWe+NHlnSK5Kov9ow+L+nfTw==",
"requires": {
"execa": "^4.1.0",
"form-data": "^3.0.0",
"got": "^11.8.0"
},
"dependencies": {
"form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
}
},
"semver": {
"version": "7.3.7",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
......
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
use SimpleSAML\Module;
......@@ -59,7 +61,8 @@ if ($this->data['errorCode'] !== null) {
}
?></p>
<p>
<button id="useWebAuthnButton" name="useWebAuthnButton" class="btn btn-primary btn-s" type="button">
<button id="useWebAuthnButton" name="useWebAuthnButton"
class="btn btn-primary btn-s" type="button">
<span><?php echo $this->t('{privacyidea:privacyidea:webauthn}'); ?></span>
</button>
</p>
......@@ -72,16 +75,28 @@ if ($this->data['errorCode'] !== null) {
<p><?php echo $this->t('{campusmultiauth:otp_help}'); ?></p>
<div class="form-inline">
<p class="size--m--4-4 size--l--6-12">
<label for="otp" class="sr-only"><?php echo $this->t('{privacyidea:privacyidea:otp}'); ?></label>
<label for="otp" class="sr-only">
<?php echo $this->t('{privacyidea:privacyidea:otp}'); ?>
</label>
<span class="inp-fix">
<input id="otp" name="otp" tabindex="1" value="" class="text inp-text" autocomplete="one-time-code" type="number" inputmode="numeric" pattern="[0-9]{6,}" required placeholder="<?php echo htmlspecialchars($otpHint, ENT_QUOTES); ?>"<?php if ($this->data['noAlternatives']) {
<input id="otp" name="otp" tabindex="1" value="" class="text inp-text"
autocomplete="one-time-code" type="number" inputmode="numeric"
pattern="[0-9]{6,}" required
placeholder="<?php echo htmlspecialchars($otpHint, ENT_QUOTES); ?>"
<?php if ($this->data['noAlternatives']) {
echo ' autofocus';
} ?> />
</span>
</p>
<p>
<button id="submitButton" tabindex="1" class="rc-button rc-button-submit btn btn-primary btn-s nowrap" type="submit" name="Submit">
<span><?php echo htmlspecialchars($this->t('{login:login_button}'), ENT_QUOTES); ?></span>
<button id="submitButton" tabindex="1"
class="rc-button rc-button-submit btn btn-primary btn-s nowrap"
type="submit" name="Submit">
<span>
<?php echo htmlspecialchars(
$this->t('{login:login_button}'),
ENT_QUOTES
); ?></span>
</button>
</p>
</div>
......@@ -90,33 +105,45 @@ if ($this->data['errorCode'] !== null) {
<!-- Undefined index is suppressed and the default is used for these values -->
<input id="mode" type="hidden" name="mode" value="otp"
data-preferred="<?php echo htmlspecialchars($this->data['mode'], ENT_QUOTES); ?>"/>
data-preferred="<?php echo htmlspecialchars($this->data['mode'], ENT_QUOTES); ?>"/>
<input id="pushAvailable" type="hidden" name="pushAvailable"
value="<?php echo ($this->data['pushAvailable'] ?? false) ? 'true' : ''; ?>"/>
value="<?php echo ($this->data['pushAvailable'] ?? false) ? 'true' : ''; ?>"/>
<input id="otpAvailable" type="hidden" name="otpAvailable"
value="<?php echo ($this->data['otpAvailable'] ?? true) ? 'true' : ''; ?>"/>
value="<?php echo ($this->data['otpAvailable'] ?? true) ? 'true' : ''; ?>"/>
<input id="webAuthnSignRequest" type="hidden" name="webAuthnSignRequest"
value='<?php echo htmlspecialchars($this->data['webAuthnSignRequest'] ?? '', ENT_QUOTES); ?>'/>
value='<?php echo htmlspecialchars(
$this->data['webAuthnSignRequest'] ?? '',
ENT_QUOTES
); ?>'/>
<input id="u2fSignRequest" type="hidden" name="u2fSignRequest"
value='<?php echo htmlspecialchars($this->data['u2fSignRequest'] ?? '', ENT_QUOTES); ?>'/>
value='<?php echo htmlspecialchars(
$this->data['u2fSignRequest'] ?? '',
ENT_QUOTES
); ?>'/>
<input id="modeChanged" type="hidden" name="modeChanged" value=""/>
<input id="step" type="hidden" name="step"
value="<?php echo htmlspecialchars(strval(($this->data['step'] ?? null) ?: 2), ENT_QUOTES); ?>"/>
value="<?php echo htmlspecialchars(
strval(($this->data['step'] ?? null) ?: 2),
ENT_QUOTES
); ?>"/>
<input id="webAuthnSignResponse" type="hidden" name="webAuthnSignResponse" value=""/>
<input id="u2fSignResponse" type="hidden" name="u2fSignResponse" value=""/>
<input id="origin" type="hidden" name="origin" value=""/>
<input id="loadCounter" type="hidden" name="loadCounter"
value="<?php echo htmlspecialchars(strval(($this->data['loadCounter'] ?? null) ?: 1), ENT_QUOTES); ?>"/>
value="<?php echo htmlspecialchars(
strval(($this->data['loadCounter'] ?? null) ?: 1),
ENT_QUOTES
); ?>"/>
<!-- Additional input to persist the message -->
<input type="hidden" name="message"
value="<?php echo htmlspecialchars($this->data['message'] ?? '', ENT_QUOTES); ?>"/>
value="<?php echo htmlspecialchars($this->data['message'] ?? '', ENT_QUOTES); ?>"/>
<?php
// If enrollToken load QR Code
......@@ -129,7 +156,7 @@ if ($this->data['errorCode'] !== null) {
</div>
<?php
}
?>
?>
</div>
<?php
......@@ -137,7 +164,9 @@ if ($this->data['errorCode'] !== null) {
if (array_key_exists('organizations', $this->data)) {
?>
<div class="identifier-shown">
<label for="organization"><?php echo htmlspecialchars($this->t('{login:organization}')); ?></label>
<label for="organization">
<?php echo htmlspecialchars($this->t('{login:organization}')); ?>
</label>
<select id="organization" name="organization" tabindex="3">
<?php
if (array_key_exists('selectedOrg', $this->data)) {
......@@ -146,25 +175,25 @@ if ($this->data['errorCode'] !== null) {
$selectedOrg = null;
}
foreach ($this->data['organizations'] as $orgId => $orgDesc) {
if (is_array($orgDesc)) {
$orgDesc = $this->t($orgDesc);
}
if ($orgId === $selectedOrg) {
$selected = 'selected="selected" ';
} else {
$selected = '';
}
echo '<option ' . $selected . 'value="' . htmlspecialchars(
$orgId,
ENT_QUOTES
) . '">' . htmlspecialchars($orgDesc) . '</option>';
} ?>
foreach ($this->data['organizations'] as $orgId => $orgDesc) {
if (is_array($orgDesc)) {
$orgDesc = $this->t($orgDesc);
}
if ($orgId === $selectedOrg) {
$selected = 'selected="selected" ';
} else {
$selected = '';
}
echo '<option ' . $selected . 'value="' . htmlspecialchars(
$orgId,
ENT_QUOTES
) . '">' . htmlspecialchars($orgDesc) . '</option>';
} ?>
</select>
</div>
<?php
<?php
} ?>
</div> <!-- focused -->
</div> <!-- slide-out-->
......@@ -175,7 +204,9 @@ if ($this->data['errorCode'] !== null) {
// Logout
if (($this->data['showLogout'] ?? true) && isset($this->data['LogoutURL'])) { ?>
<p>
<a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>"><?php echo $this->t('{status:logout}'); ?></a>
<a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>">
<?php echo $this->t('{status:logout}'); ?>
</a>
</p>
<?php } ?>
</div> <!-- End of login -->
......@@ -201,12 +232,19 @@ if (!empty($this->data['links'])) {
<meta id="privacyidea-step" name="privacyidea-step" content="<?php echo $this->data['step']; ?>">
<meta id="privacyidea-translations" name="privacyidea-translations" content="<?php echo htmlspecialchars(json_encode($this->data['translations'])); ?>">
<script src="<?php echo htmlspecialchars(Module::getModuleUrl('privacyidea/js/loginform.js'), ENT_QUOTES); ?>">
</script>
<script src="<?php echo htmlspecialchars(Module::getModuleUrl('campusmultiauth/resources/privacyidea.js'), ENT_QUOTES); ?>">
</script>
<meta id="privacyidea-translations" name="privacyidea-translations"
content="<?php echo htmlspecialchars(json_encode($this->data['translations'])); ?>">
<script src="<?php echo htmlspecialchars(
Module::getModuleUrl('privacyidea/js/loginform.js'),
ENT_QUOTES
);
?>"></script>
<script src="<?php echo htmlspecialchars(
Module::getModuleUrl('campusmultiauth/resources/privacyidea.js'),
ENT_QUOTES
);
?>"></script>
<?php
$this->includeAtTemplateBase('includes/footer.php');
......
......@@ -24,7 +24,9 @@ if (!empty($_GET['idphint']) && !isset($_GET['index'])) {
$searchBox = $config['components'][$index];
if (!empty($_GET['aarc_discovery_hint_uri'])) {
$idphint = Campusidp::getHintedIdps(['aarc_discovery_hint_uri' => json_decode($_GET['aarc_discovery_hint_uri'])]);
$idphint = Campusidp::getHintedIdps([
'aarc_discovery_hint_uri' => json_decode($_GET['aarc_discovery_hint_uri'])
]);
} elseif (!empty($_GET['aarc_discovery_hint'])) {
$idphint = Campusidp::getHintedIdps(['aarc_discovery_hint' => json_decode($_GET['aarc_discovery_hint'])]);
} elseif (!empty($_GET['idphint'])) {
......
......@@ -38,7 +38,10 @@ if ($hintedIdps !== null || array_key_exists('idphint', $state)) {
if ($hintedIdps !== null && count($hintedIdps) === 1) {
$state['saml:idp'] = array_pop($hintedIdps);
Campusidp::delegateAuthentication($state[Campusidp::SP_SOURCE_NAME], $state);
} elseif ($hintedIdps === null && array_key_exists('idphint', $state) && count(explode(',', $state['idphint'])) === 1) {
} elseif (
$hintedIdps === null && array_key_exists('idphint', $state)
&& count(explode(',', $state['idphint'])) === 1
) {
$state['saml:idp'] = urldecode($parts[0]);
Campusidp::delegateAuthentication($state[Campusidp::SP_SOURCE_NAME], $state);
} else {
......@@ -89,9 +92,11 @@ if (array_key_exists('source', $_POST)) {
if (array_key_exists('searchbox', $_POST)) {
$state['saml:idp'] = $_POST['searchbox'];
if (!empty($metadata[$_POST['searchbox']]) &&
if (
!empty($metadata[$_POST['searchbox']]) &&
!empty($wayfConfig['components'][$_POST['componentIndex']]) &&
$wayfConfig['components'][$_POST['componentIndex']]['name'] === 'searchbox') {
$wayfConfig['components'][$_POST['componentIndex']]['name'] === 'searchbox'
) {
$prevIdps = Campusidp::getCookie(Campusidp::COOKIE_PREVIOUS_IDPS) === null ?
[] :
json_decode(
......@@ -162,7 +167,9 @@ if (!empty($_POST['q'])) {
$ch,
CURLOPT_URL,
Module::getModuleURL(
'campusmultiauth/idpSearch.php?q=' . $_POST['q'] . '&index=' . $_POST['componentIndex'] . '&language=' . $_POST['currentLanguage']
'campusmultiauth/idpSearch.php?q=' . $_POST['q']
. '&index=' . $_POST['componentIndex']
. '&language=' . $_POST['currentLanguage']
)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
......