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

refactor: refactoring for ssp 2.0.0 #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

szabogyula
Copy link
Member

No description provided.

@szabogyula szabogyula mentioned this pull request Oct 26, 2022
@ghalse
Copy link

ghalse commented Dec 14, 2022

I get an exception with this patch on SSP 2.0.0-rc2:

SimpleSAML\Error\Error: UNHANDLEDEXCEPTION
Backtrace:
2 www/_include.php:28 (SimpleSAML_exception_handler)
1 vendor/symfony/error-handler/ErrorHandler.php:607 (Symfony\Component\ErrorHandler\ErrorHandler::handleException)
0 [builtin] (N/A)
Caused by: Exception: Could not resolve 'attributescope:FilterAttributes': The class 'SimpleSAML\Module\attributescope\Auth\Process\FilterAttributes' isn't a subclass of '\SimpleSAML\Auth\ProcessingFilter'.
Backtrace:
8 src/SimpleSAML/Module.php:459 (SimpleSAML\Module::resolveClass)
7 src/SimpleSAML/Auth/ProcessingChain.php:158 (SimpleSAML\Auth\ProcessingChain::parseFilter)
6 src/SimpleSAML/Auth/ProcessingChain.php:134 (SimpleSAML\Auth\ProcessingChain::parseFilterList)
5 src/SimpleSAML/Auth/ProcessingChain.php:67 (SimpleSAML\Auth\ProcessingChain::__construct)
4 modules/saml/src/Auth/Source/SP.php:1126 (SimpleSAML\Module\saml\Auth\Source\SP::handleResponse)
3 [builtin] (call_user_func_array)
2 src/SimpleSAML/HTTP/RunnableResponse.php:72 (SimpleSAML\HTTP\RunnableResponse::sendContent)
1 vendor/symfony/http-foundation/Response.php:394 (Symfony\Component\HttpFoundation\Response::send)
0 /opt/simplesamlphp-1.19.4/www/module.php:10 (N/A)

So far as I can tell, it's because you've declared the namespace as SimpleSAML\Module\niif\attributescope\Auth\Process whereas it is expecting SimpleSAML\Module\attributescope\Auth\Process based on the module name.

Removing the niif/ from the class name seems to fix the problem.

@ghalse
Copy link

ghalse commented May 22, 2023

Removing the niif/ from the class name seems to fix the problem.

Just to note this is still the case on SSP 2.0.3. I'm fixing it with this patch:

--- attributescope/src/Auth/Process/FilterAttributes.php.orig	2023-01-09 11:25:21.586924098 +0200
+++ attributescope/src/Auth/Process/FilterAttributes.php	2023-01-09 11:25:37.754923580 +0200
@@ -23,7 +23,7 @@
  * @link     https://github.com/niif/simplesamlphp-module-attributescope
  */
 
-namespace SimpleSAML\Module\niif\attributescope\Auth\Process;
+namespace SimpleSAML\Module\attributescope\Auth\Process;
 use SimpleSAML\Auth;
 use SimpleSAML\Logger;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants