I am new in Angular 2 development.In my application I have login module where passing username and password[Plain Text] to Web APi controller for authentication from angular service class.
Below is my angular 2 service method which calls web api.
authenticate(model) {
let headers = new Headers({ 'Content-Type': 'application/json; charste=utf-8' });
let options = new RequestOptions({ headers: headers });
let body = JSON.stringify(model);
return this.http.post('http://localhost:24314/api/Users/', body, options)
.map(response => response.json()).catch(this.handleErrorObservable);
}
Somehow I want to encrypt this password field while sending to web api.
Any help or suggestion would be appreciated.
Thanks in advance.