Problem/Motivation
Upon hitting the oidc SSO for log in, the user receives the following error in the browser
The website encountered an unexpected error. Please try again later.
Error: Class "Sop\JWX\JWT\JWT" not found in Drupal\oidc\OpenidConnectRealm\OpenidConnectRealmBase->getJsonWebTokens() (line 367 of /bitnami/drupal/modules/contrib/oidc/src/OpenidConnectRealm/OpenidConnectRealmBase.php).
In the drupal logs, I see the following Warning and 2 errors (in order)
Path: /. Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: The 'access content' permission is required. in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 118 of /opt/bitnami/drupal/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).
then
Error: Class "Sop\JWX\JWT\JWT" not found in Drupal\oidc\OpenidConnectRealm\OpenidConnectRealmBase->getJsonWebTokens() (line 367 of /bitnami/drupal/modules/contrib/oidc/src/OpenidConnectRealm/OpenidConnectRealmBase.php)
#0 /bitnami/drupal/modules/contrib/oidc/src/Plugin/OpenidConnectRealm/GenericOpenidConnectRealm.php(401): Drupal\oidc\OpenidConnectRealm\OpenidConnectRealmBase->getJsonWebTokens()
#1 /bitnami/drupal/modules/contrib/oidc/src/OpenidConnectRealm/OpenidConnectRealmBase.php(135): Drupal\oidc\Plugin\OpenidConnectRealm\GenericOpenidConnectRealm->getJsonWebTokens()
#2 /bitnami/drupal/modules/contrib/oidc/src/Controller/OpenidConnectController.php(197): Drupal\oidc\OpenidConnectRealm\OpenidConnectRealmBase->getJsonWebTokensForLogin()
#3 [internal function]: Drupal\oidc\Controller\OpenidConnectController->loginRedirect()
#4 /opt/bitnami/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#5 /opt/bitnami/drupal/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#6 /opt/bitnami/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#7 /opt/bitnami/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#8 /opt/bitnami/drupal/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /opt/bitnami/drupal/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#10 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#11 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#12 /opt/bitnami/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#13 /opt/bitnami/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#14 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#15 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#16 /opt/bitnami/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#17 /opt/bitnami/drupal/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#18 /opt/bitnami/drupal/index.php(19): Drupal\Core\DrupalKernel->handle()
#19 {main}
then
Error: Class "Sop\JWX\JWT\JWT" not found in Drupal\oidc\OpenidConnectRealm\OpenidConnectRealmBase->getJsonWebTokens() (line 367 of /bitnami/drupal/modules/contrib/oidc/src/OpenidConnectRealm/OpenidConnectRealmBase.php)
#0 /bitnami/drupal/modules/contrib/oidc/src/Plugin/OpenidConnectRealm/GenericOpenidConnectRealm.php(401): Drupal\oidc\OpenidConnectRealm\OpenidConnectRealmBase->getJsonWebTokens()
#1 /bitnami/drupal/modules/contrib/oidc/src/OpenidConnectRealm/OpenidConnectRealmBase.php(135): Drupal\oidc\Plugin\OpenidConnectRealm\GenericOpenidConnectRealm->getJsonWebTokens()
#2 /bitnami/drupal/modules/contrib/oidc/src/Controller/OpenidConnectController.php(197): Drupal\oidc\OpenidConnectRealm\OpenidConnectRealmBase->getJsonWebTokensForLogin()
#3 [internal function]: Drupal\oidc\Controller\OpenidConnectController->loginRedirect()
#4 /opt/bitnami/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#5 /opt/bitnami/drupal/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#6 /opt/bitnami/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#7 /opt/bitnami/drupal/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#8 /opt/bitnami/drupal/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /opt/bitnami/drupal/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#10 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#11 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#12 /opt/bitnami/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#13 /opt/bitnami/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#14 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#15 /opt/bitnami/drupal/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#16 /opt/bitnami/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#17 /opt/bitnami/drupal/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#18 /opt/bitnami/drupal/index.php(19): Drupal\Core\DrupalKernel->handle()
#19 {main}
Steps to reproduce
Install oidc
module via composer require 'drupal/oidc:^2.2'
Create/configure new generic realm + configure provider
drush cget oidc.settings
returns
generic_realms:
- <the_realm_id>
login_path: /oidc/login/generic%3A<the_realm_id>
redirect_403: true
disable_user_routes: true
show_session_expired_message: true
drush cget oidc.realm.generic.<the_realm_id>
returns
config_url: '<provider's discovery endpoint>'
client_id: <the-client-id>
client_secret: <TheClientSecret>
scopes:
- profile
- email
request_userinfo: false
id_claim: sub
username_claim: preferred_username
email_claim: email
given_name_claim: given_name
family_name_claim: family_name
display_name_format: '[user:account-name]'
default_rid: generic_logged_in
name: <the realm's name>
I could have sworn I had oidc working previously several months ago. But this is what I see now, and I've love to figure out what's going wrong.