Back to front pageView on Hacker News (opens in a new tab)Ask HN: What's the recommended method of adding authentication to a REST API?397 pointsby somtum (on Hacker News)8 years agoComments (249) 36 threadsShow all commentsShowing thread 30 of 36Raed6678 years ago#JWT is pretty easy to understand.Create a token, put your userId in it, set an expiry date.If a request comes with a token check if token is valid, check the userId & expiry date otherwise throw error.
Ask HN: What's the recommended method of adding authentication to a REST API?397 pointsby somtum (on Hacker News)8 years ago
Raed6678 years ago#JWT is pretty easy to understand.Create a token, put your userId in it, set an expiry date.If a request comes with a token check if token is valid, check the userId & expiry date otherwise throw error.
Comments (249) 36 threads
Show all comments
Showing thread 30 of 36
Create a token, put your userId in it, set an expiry date.
If a request comes with a token check if token is valid, check the userId & expiry date otherwise throw error.