Reworking JWT authentication
This commit is contained in:
@@ -19,9 +19,11 @@ Content-Type: application/json
|
||||
"password": "helloworld"
|
||||
}
|
||||
|
||||
|
||||
//DOCS: Used for validating the email address above
|
||||
GET /auth/validation?username=example&token=12345678
|
||||
|
||||
|
||||
//DOCS: Login after validation
|
||||
POST /auth/login
|
||||
Content-Type: application/json
|
||||
@@ -37,7 +39,8 @@ Content-Type: application/json
|
||||
"refreshToken": "fghij"
|
||||
}
|
||||
|
||||
//Replace an expired authToken pair with these values
|
||||
|
||||
//DOCS: Replace an expired authToken pair with these values
|
||||
POST /auth/token
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -45,6 +48,7 @@ Content-Type: application/json
|
||||
"token": "refreshToken"
|
||||
}
|
||||
|
||||
|
||||
//DOCS: After this is called, the refresh route will no longer work
|
||||
DELETE /auth/logout
|
||||
Authorization: Bearer accessToken
|
||||
@@ -53,6 +57,7 @@ Authorization: Bearer accessToken
|
||||
"token": "refreshToken"
|
||||
}
|
||||
|
||||
|
||||
//DOCS: Retreives the private account data, results vary
|
||||
GET /auth/account
|
||||
Authorization: Bearer accessToken
|
||||
@@ -63,11 +68,13 @@ Authorization: Bearer accessToken
|
||||
"refreshToken": "fghij"
|
||||
}
|
||||
|
||||
|
||||
//DOCS: Update account data, input varies, but is always JSON
|
||||
PATCH /auth/account
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer accessToken
|
||||
|
||||
|
||||
//DOCS: Sets the timer, account will be deleted after 2 days
|
||||
DELETE /auth/account
|
||||
Authorization: Bearer accessToken
|
||||
|
||||
Reference in New Issue
Block a user