SHIV5T3R / CO-DE

An Open Source Collaborative Code Editor
34 stars 26 forks source link

API Validation #49

Closed jaybuurdd closed 1 year ago

jaybuurdd commented 1 year ago

Added validation decorator we can use on future endpoints.

When a user login their access token and id will be set in cookies, while the refresh token is saved in Redis. When validation decorator is set it will execute logic that checks the for user id in cookies and then checks redis for refresh key that was all initially set when user logged in.

Tested via postman.