Reputation: 315
I created a stateless RESTful API secured by HTTP Basic.
On the client side I will create a login form sending a request to /auth-check to check the credentials and depending on the status code, I will store these credentials on the client side and use that to perform the next requests.
I am looking for the safest way to store the user credentials on the client side so users don't have to submit them at each request or loose them when they leave the site.
Upvotes: 0
Views: 60
Reputation: 7501
Don't store the user credentials. If anything, generate a unique token that that user can use to identify themselves.
Upvotes: 1