Skip to content

Draft: Extract registry token methods to token module

Steve Abrams requested to merge container_token_module into master

What does this MR do and why?

This is a work in progress. It refactors the registry auth service to extract token generation to a separate class or module. The goal is to have no code changes, but a pure refactor.

Currently I have things set up as a module since we were already using class methods, but I think I may continue the refactor to make it into a service so we have two methods: authenticated_token and access_token. The biggest challenge will likely be refactoring the specs to mock the token creation.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Steve Abrams

Merge request reports