galasa-dev / projectmanagement

Project Management repo for Issues and ZenHub
7 stars 3 forks source link

Tech debt: Move the POST endpoint that creates tokens from /auth to /auth/tokens #1865

Closed eamansour closed 4 weeks ago

eamansour commented 1 month ago

Story

As a Galasa REST API user, I want to create tokens using a POST request to the /auth/tokens endpoint instead of /auth, so that I can clearly identify that I am creating tokens and avoid confusion when authenticating with the Galasa server.

Background

Currently, the POST /auth endpoint creates a new JWT and refresh token (same as the OpenID Connect /tokens endpoint), and also stores information about a token in the auth store when a new token is created. This should be moved to the /auth/tokens endpoint.

Also worth noting - the existing POST /auth doesn't insist on a JWT since it's used to get new JWTs and refresh tokens.

Tasks