Pass JWT library class name in to UsersJwtAuth::__construct

Created on 12 March 2023, over 1 year ago
Updated 15 March 2023, over 1 year ago

Problem/Motivation

recently \Drupal\jwt\Transcoder\JwtTranscoder::__construct() was changed to take a class name instead of an instance of the JWT library class. This provides for some more flexibility and avoiding a constructor change if changing the JWT library is needed.

However, \Drupal\users_jwt\Authentication\Provider\UsersJwtAuth is making a calls to e.g. JWT::decode() and there is no way to swap that implementation.

Proposed resolution

Pass in a class name to that service also. Note that the users_jwt module does not depend on the jwt module to function, so it does not use the \Drupal\jwt\Transcoder\JwtTranscoder.

Remaining tasks

Implement and verify tests pass

User interface changes

n/a

API changes

constructor change

Data model changes

n/a

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States pwolanin

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

Comments & Activities

Production build 0.69.0 2024