【发布时间】:2018-09-28 23:27:05
【问题描述】:
我在使用 ionic 3 / Angular 4 的应用程序中工作,但我的登录功能有问题。 我想从这里更改 json 格式:
> this.data = {
> grant_type: "password",
> username: this.loginData.username,
> password: this.loginData.password,
> client_id: "client"
> };
这样的事情
?grant_type=password&client_id=client&client_secret=secret&username=admin&password=123456
所以我可以使用它进行令牌认证:
我在 ionic 1 / angularJS 中使用它
数据:$httpParamSerializer($scope.data);
但我不知道角度 4 中的等价物。
提前致谢:)
【问题讨论】:
标签: angular authentication ionic3 token serialization