nextcloud/tests/lib/AppFramework/Middleware/Security/Mock/PasswordConfirmationMiddlewareController.php
Arthur Schiwon 340939e688
fix(Session): avoid password confirmation on SSO
SSO backends like SAML and OIDC tried a trick to suppress password
confirmations as they are not possible by design. At least for SAML it was
not reliable when existing user backends where used as user repositories.

Now we are setting a special scope with the token, and also make sure that
the scope is taken over when tokens are regenerated.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-06-05 19:01:13 +02:00

37 lines
726 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\AppFramework\Middleware\Security\Mock;
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
class PasswordConfirmationMiddlewareController extends \OCP\AppFramework\Controller {
public function testNoAnnotationNorAttribute() {
}
/**
* @TestAnnotation
*/
public function testDifferentAnnotation() {
}
/**
* @PasswordConfirmationRequired
*/
public function testAnnotation() {
}
#[PasswordConfirmationRequired]
public function testAttribute() {
}
#[PasswordConfirmationRequired]
public function testSSO() {
}
}