Incorrect provider ID

Created on 8 July 2017, almost 7 years ago
Updated 24 May 2024, about 1 month ago

The definition of the service has the wrong service ID making that the authenticator never matches the default defaultFilter for the route.

When Drupal checks if a route matches any authenticator, uses the service provider_id value from the tag to see if the given route matches.

Drupal version: 8.3
API Key Services Version: 8.x-1.0

Current services_api_key_auth.services.yml

services:
  authentication.services_api_key_auth:
    class: Drupal\services_api_key_auth\Authentication\Provider\ApiKeyAuth
    arguments: ['@config.factory', '@entity.manager']
    tags:
      - { name: authentication_provider, provider_id: api_key_auth, priority: 100 }

Fixed services_api_key_auth.services.yml

services:
  authentication.services_api_key_auth:
    class: Drupal\services_api_key_auth\Authentication\Provider\ApiKeyAuth
    arguments: ['@config.factory', '@entity.manager']
    tags:
      - { name: authentication_provider, provider_id: services_api_key_auth, priority: 100 }

Difference:

-      - { name: authentication_provider, provider_id: api_key_auth, priority: 100 }
+      - { name: authentication_provider, provider_id: services_api_key_auth, priority: 100 }
πŸ› Bug report
Status

Postponed: needs info

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡·Costa Rica pviquez@pabloviquez.com

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.69.0 2024