Backend of ecommerce website
Login with a users credentials, send token with credentials, will be attached to the account if successfully logged in
{
username: [string],
password: [string],
}
Status Code: 200
{
token: [string]
}
Status Code: 400+
{
error: [string]
}
Validates a users session is still authorized
{
token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Update a users password
{
old_password: [string],
new_password: [string],
username: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Expire a session for a user
{
token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Update a users session from and old token to a new one
{
old_token: [string],
new_token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}