【发布时间】:2016-04-03 17:49:39
【问题描述】:
我有一个用 AngularJS 编写的应用程序,它通过 oauth 2 联系 Web API 以进行身份验证。该核心部分一切正常,但我需要传入额外的参数来评估登录 (clientID) 并设置记住我的类型功能(记住)。
从 Angular 来看,它看起来像这样:
var data = "grant_type=password&username=" + form.username + "&password=" + form.password + "&clientID=" + clientID + "&remember=" + form.remember;
var deferred = $q.defer();
$http.post(serviceBase + 'token', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }).success(function (response) {
在我通过 Startup.cs 和 SimpleAuthorizationServerProvider.cs 处理令牌后,有什么想法是捕获这些值的最佳方式吗?谢谢
【问题讨论】:
标签: c# angularjs asp.net-web-api oauth-2.0