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
[x] Copy the code in the POST /auth endpoint to the /auth/tokens endpoint
[x] Update OpenAPI docs and mark POST /auth as deprecated
[x] Make the webui use the new POST /auth/tokens endpoint
[x] Make the CLI use the new POST /auth/tokens endpoint
[x] Test that the ecosystem works the same as before
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
/auth
endpoint to the/auth/tokens
endpointPOST /auth
as deprecatedPOST /auth/tokens
endpointPOST /auth/tokens
endpoint