微软认证授权服务器,oauth 2.0到微软认证服务器

需要格式化令牌请求的帮助。我搜索了一遍,看了很多文档。提琴手的回应是关于“grant_type”的大喊,但它包括在内。oauth 2.0到微软认证服务器

POST http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=https%3A//login.microsoftonline.com/[removed]/oauth2/token HTTP/1.1

Host: localhost:4400

Connection: keep-alive

Content-Length: 104

Authorization: Basic YWZyaWVkOnRlc3Q=

Origin: http://localhost:4400

Content-Type: text/plain;charset=UTF-8

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

X-Ripple-User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.2; en-us; Nexus S Build/GRH78C) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Accept: */*

Referer: http://localhost:4400/login.html

Accept-Encoding: gzip, deflate

Accept-Language: en-US,en;q=0.8

grant_type='password'&username='afried'&password='test'&client_id='[removed]'

我还试图在发送它们没有“(grant_type =密码,例如),以及创建一个对象(我试图字符串化的话):

var data = { 'grant_type': 'password',

'username': userID,

'password': password,

'client_id': clientId

};

提琴手哪些文章作为

[object Object]

Authorization头是用户名:密码,我的印象是,用密码批,您可以直接从令牌端点请求而不先击中身份验证的端点,因为你正在发送用户名/密码。

我有.withCredentials = true。内容安全策略也可以。

任何帮助将不胜感激。我知道这很简单,我只是看不到它,我想我只是没有经验,没有什么是跳出来对我的。

2016-06-15

Aaron

+0

它看起来像我必须设置一个内容类型标题。我已经过了grant_type的问题,但现在想要一个“资源”......仍然在努力,但我认为答案只是“添加一个Content-Type标题[我使用了application/x-www-form-urlencoded和它似乎在工作“] –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值