Create a TokenManagerInterface and make the TokenGeneratorInterface SRP

Created on 15 July 2023, 12 months ago

Problem/Motivation

Currently, the TokenGeneratorInterface handles the token creation as well as persisting the created token into the DB, action that is implemented in the TokenManager. To make the Token TokenGeneratorInterface abide by the Single Responsibility Principle (SRP), move the token, make the TokenGeneratorInterface only handle the unique token generation, and move the other actions into the TokenManager.

Proposed resolution

  1. Create a TokenManagerInterface
  2. Add a `generateToken` function in it
  3. Refactor the `TokenManager` and `TokenGenerator` implementations
  4. Change references where the `TokenGenerator` is being called when the `TokenManager` is actually needed
πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡·Costa Rica robertarias

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

Comments & Activities

Production build 0.69.0 2024