daljit
daljit

Reputation: 1266

form authorization for asp.net web api using javascript

I want to rewrite business application using asp.net web api as service layer and use javascript to call the web api and get data, display etc.

I understand all the scenrios work fine, but main bottleneck is security. We have database for the user name and password. We want that user enter user name and password, validate it using web api. Then for each request pass the user name and password to check rights etc. What is the best way to secure this communication if any.

Upvotes: 0

Views: 258

Answers (1)

cecilphillip
cecilphillip

Reputation: 11596

You're best bet is going to be implementing HTTPS with SSL. You would consider using an encryption algorithm, but everything will be expose anyone if you're using JavaScript which would make encrypting and decrypting on the client quiet pointless.

Here's is a good blog post reference you can review on the matter http://goo.gl/QkZOf

Upvotes: 1

Related Questions