我是Angular 2开发的新手.在我的应用程序中,我有登录模块,其中将用户名和密码[纯文本]传递给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); }
不知何故,我想在发送到web api时加密这个密码字段.
任何帮助或建议将不胜感激.
提前致谢.