The used authentication method is not allowed on this route

Created on 14 May 2021, over 3 years ago
Updated 1 March 2024, 9 months ago

Problem/Motivation

Hi, I tried to use drupal's blocks through LTI on other LMS (open edX). But getting error "The used authentication method is not allowed on this route"

Steps to reproduce

1. Generate security credentials (admin/config/lti-tool-provider/consumer, Name field - user_id, Mail field - lis_person_contact_email_primary) and set it's to LTI consumer block on LMS.
2. Create test module url (/en/group/4/module/4/answer/2) and set in LMS.
3. Try to use it on LMS side from test user

User interface changes

LMS says to test user:
You are not authorized to access this page.

API changes

LTI consumers block (on my LMS) sends to Drupal some data:

{
   "custom_component_display_name":"LTI Consumer",
   "lti_version":"LTI-1p0",
   "oauth_nonce":"52868150698823546541620979372",
   "resource_link_id":"LMS_address-9f44d5ed574f47f8bf9d357137471d1d",
   "context_id":"course-v1:test+000+whatever",
   "oauth_signature_method":"HMAC-SHA1",
   "oauth_timestamp":"1620979372",
   "oauth_version":"1.0",
   "lis_person_contact_email_primary":"m***@gmail.com",
   "oauth_signature":"3mimanL972dtauZT7mmcjP3r7fo=",
   "context_title":"d",
   "lti_message_type":"basic-lti-launch-request",
   "launch_presentation_return_url":"",
   "context_label":"test",
   "user_id":"fcbf5bf0c62cfd5acfff58b2e8bae288",
   "roles":"Student",
   "oauth_consumer_key":"Z9eRg4tHcJ",
   "lis_result_sourcedid":"course-v1%3Atest%2B000%2Bwhatever:LMS_address-9f44d5ed574f47f8bf9d357137471d1d:fcbf5bf0c62cfd5acfff58b2e8bae288",
   "lis_outcome_service_url":"https://LMS_address/courses/course-v1:test+000+whatever/xblock/block-v1:test+000+whatever+type@lti_consumer+block@9f44d5ed574f47f8bf9d357137471d1d/handler_noauth/outcome_service_handler",
   "oauth_callback":"about:blank"
}

Data model changes

Drupal logs says:
1. Session opened for fcbf5bf0c62cfd5acfff58b2e8bae288.
2. access denied Path: /en/group/4/module/4/answer/2. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: The used authentication method is not allowed on this route. in Drupal\Core\EventSubscriber\AuthenticationSubscriber->onExceptionAccessDenied() (line 134 of /var/www/html/opigno/web/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php).

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡·πŸ‡ΊRussia eazaika

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024