itsdeannat / the-brew-ha-ha-api

A coffee-themed API built with the Django Rest Framework
MIT License
0 stars 0 forks source link

[FEATURE] Users must request a JSON Web Token to authenticate with the API #3

Closed itsdeannat closed 2 weeks ago

itsdeannat commented 2 weeks ago

As a user I want to get a JSON Web Token from the API So that I can make API calls to the API's endpoints

Scenario

Given: a user has registered with the API And: they don't have a JWT yet When: they send a POST request to /token Then: the API sends an access and refresh token to the user

Scenario

Given: a user has not registered with the API And: they don't have a JWT yet When: they send a POST request to /token Then: the API tells the user they need to register first

Feature completion checklist

itsdeannat commented 2 weeks ago

If user hasn't signed up, API returns

{
    "detail": "No active account found with the given credentials"
}