diff --git a/README.md b/README.md index 22b440e..5f06448 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,16 @@ Content-Type: application/json } -//DOCS: Used for validating the email address above +### + + +//DOCS: Used for validating the email address specified above GET /auth/validation?username=example&token=12345678 +### + + //DOCS: Login after validation POST /auth/login Content-Type: application/json @@ -33,14 +39,17 @@ Content-Type: application/json "password": "helloworld" } -//Result (access token's value is your authorization key below) +//DOCS: Result (access token's value is your authorization key below) { "accessToken": "abcde", "refreshToken": "fghij" } -//DOCS: Replace an expired authToken pair with these values +### + + +//DOCS: Replace an expired authToken pair with new values POST /auth/token Content-Type: application/json @@ -48,6 +57,15 @@ Content-Type: application/json "token": "refreshToken" } +//DOCS: Result +{ + "accessToken": "abcde", + "refreshToken": "fghij" +} + + +### + //DOCS: After this is called, the refresh route will no longer work DELETE /auth/logout @@ -58,22 +76,30 @@ Authorization: Bearer accessToken } +### + + //DOCS: Retreives the private account data, results vary GET /auth/account Authorization: Bearer accessToken -//Result -{ - "accessToken": "abcde", - "refreshToken": "fghij" -} + +### -//DOCS: Update account data, input varies, but is always JSON +//DOCS: Update account data PATCH /auth/account Content-Type: application/json Authorization: Bearer accessToken +{ + "password": "helloworld", + "contact": true +} + + +### + //DOCS: Sets the timer, account will be deleted after 2 days DELETE /auth/account @@ -85,6 +111,9 @@ Content-Type: application/json } +### + + //DOCS: Send the link to recover a forgotten password POST /auth/recover Content-Type: application/json @@ -94,17 +123,26 @@ Content-Type: application/json } +### + + //DOCS: Redirect the link to recover a password to the front-end GET /auth/reset?token= -//Result +//DOCS: Result 301 -> ${WEB_RESET_ADDRESS}?email=&token= +### + + //DOCS: Resets a password for the given email, correct token is required PATCH /auth/reset?email=&token= { "password": "password" } + + +### ```