问题描述
大家好,我正在使用Delegated Auth SDK访问Windows Live Contacts API,但我遇到了一些问题。几个月前我最初设置了问题代码。那个时候,一切都很好。我能够验证和访问联系人API。从那时起,有问题的代码发生了一些变化,已经转移到另一个域。自从发生这种情况以来,DelAuth一直存在问题。
我的第一个问题是:哦,显然,我已经更改了域名,因此旧的服务数据无效。所以我使用了Live Services门户并删除了该服务,然后为新域添加了一个新服务。我更新了我的设置并进行了测试。但是,我被告知Windows Live无法与我的应用程序共享数据,而不是工作。错误显示的URL为以下格式:https://consent.live.com/pp650/Error.aspx?mkt = en-ZA& ErrorCode = 3007& Detet = 0x80045a92& ru =< RURURNURL> ;。咨询DelAuth文档,我发现错误代码3007对应于:<方法名称>中的"同意服务API失败"。方法。应用验证程序无效。
要约安全级别要求有效的应用程序验证者随请求一起传递。"不幸的是,我不知道为什么会发生这种情况。我仔细检查了ReturnUrl作为搜索错误3007的数据,发现不正确的ReturnUrl会导致这个问题但我的ReturnUrl很好并且错误仍然存在。
之后,我发现通过指示PHP API使用Non-Provisions DelAuth($ this-> objLiveLogin-> setForceDelAuthNonProvisioned(true);)
我不再接收3007我被发回到ReturnUrl页面。检查POST数据后,我从DelAuth收到以下内容:
ConsentToken | EACT%3DxXLLlwEZQZot7hWm12QkfOYy0SgxVnlOjExjKoPVvIflDNJ%252Byh0bOQO4aJvVUJCHgIikvy2lorfYtZ3xx6XD57LP8qkv %252FSld1SvtTCH6FHemqezhFaAreUQsHg1fTyYmtwBhrzRhTsgV2d%252BT1JtELgfmNgZoHyFBbZJs4kEsbuMPWRKhFfRVhcC6XiplkTgr4YzeWw91YAxPYSxIILhbiGiVAlXES %252BpzpZzB5uT7BQnJcuhgu6qp%252FeGXqD1KrduW17cqNFLY%252FC7BP%252FyBEO7QFiNAJHtyfdXA0vsvKo9T4I1zZLKlcbjPuFjG %252F%252BdADZ4ZncuILwd9PRB9%252BwtROwoACgE2leD3C%252FANWB8gAHtH4SDcCEvLdvRpKOogJrrUp6Corco0b3NtCgKG9PBYAbN2V %252Fld6dxP2uLlslWIxxXwbQD2LmJvcdlkboWCa86HFMDH6lELBOOVHCjBG0An4AFNfRd%252Bm8bA0gR3QksRTfzWAio76l0oyxx41cBpFi5vyP2cGjYmc4Jd9NiRWKrFDuxPjZSacJFFlyJkrpF7E6sGsMkRYhC7gg3sUI %252ByA8UhdjX7kl8ENktt1n1e2IAZbHPMdGJlv%252BETT%252BRGsBTq9ysXPk21lucd8Y3yxjbzyEpZIidAw%252FwDxf4DbWbcDl %252B9NXi%252Fqp2bIKIn9DEoRK2Vb0Lvy9%252BlOMfvhK50kDvFrAK%252F%252B5v3iQlYKO5rOsGxTXAwUM5xZUmPXEFLHSg2AOSmbJkLGTy7ZmVBnMt84 %252BBPkG44b7q0e51wo6vo8FJUFeoWax4jA%252FNQ9RTm6y2fC8Npore5MikTveJh33gOdm%252BYliUa4d0Yby%252BvhRFwS401iKl2nAar9KdkVNY9sO5sA1PIAIwvfoSYdSOPOJWPjD0OvUnc2 %252FFqww3% 252FqUgvQjFBYhqRd9WyeXyGU8cg0QWuavHbTQR2n%252Bgg%252FvChRyB5RGu5jOoPUFc%252B3oWzAtm%252FegvJB9 %252BQ8LzMoqNZx3wh%252B2bNfjFdrPEJbHYqWNeriQEHhX5VKZWEmPNM%252BToD4USj405HEDEmkudRenDFNUclIulDIhgvAoFmX2uEFBidLCxnTvZGwrTY6JRUETdfLDWGomTanzNj4nDIJI1DeWIiyGbpewX9NyqAcOzxHXwjVf2 %252BXe6myC5mJIvladYghmcOb7pXTd7Dsr1l1clyI1mKs1EMq9FcyZX1fwrFjZZZdA6A32bWDVGXvicN5zey6gUWfLmQY0tAJycmV7R8wJxOdHQRuIDwcXEPXwXYSxg9ZtyA %252BfN707eFo0kP |
ResponseCode | RequestApproved |
action | delauth |
appctx | |
不幸的是, PHP API中的processConsent()拒绝此同意数据。具体来说,我在日志中收到以下输出:
周五1月15日14:50:46 2010] [错误] [客户端41.185.111.113]错误:validateToken:无效令牌:\ xe5 \ x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BSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
[周五年01月15 14点50分46秒2010] [错误] [客户端41.185.111.113]错误:processConsentToken:无法解码/验证令牌:EACT%3DxXLLlwEZQZot7hWm12QkfOYy0SgxVnlOjExjKoPVvIflDNJ%252Byh0bOQO4aJvVUJCHgIikvy2lorfYtZ3xx6XD57LP8qkv%252FSld1SvtTCH6FHemqezhFaAreUQsHg1fTyYmtwBhrzRhTsgV2d%252BT1JtELgfmNgZoHyFBbZJs4kEsbuMPWRKhFfRVhcC6XiplkTgr4YzeWw91YAxPYSxIILhbiGiVAlXES%252BpzpZzB5uT7BQnJcuhgu6qp%252FeGXqD1KrduW17cqNFLY%252FC7BP %252FyBEO7QFiNAJHtyfdXA0vsvKo9T4I1zZLKlcbjPuFjG%252F%252BdADZ4ZncuILwd9PRB9%252BwtROwoACgE2leD3C%252FANWB8gAHtH4SDcCEvLdvRpKOogJrrUp6Corco0b3NtCgKG9PBYAbN2V%252Fld6dxP2uLlslWIxxXwbQD2LmJvcdlkboWCa86HFMDH6lELBOOVHCjBG0An4AFNfRd%252Bm8bA0gR3QksRTfzWAio76l0oyxx41cBpFi5vyP2cGjYmc4Jd9NiRWKrFDuxPjZSacJFFlyJkrpF7E6sGsMkRYhC7gg3sUI%252ByA8UhdjX7kl8ENktt1n1e2IAZbHPMdGJlv%252BETT%252BRGsBTq9ysXPk21lucd8Y3yxjbzyEpZIidAw%252FwDxf4DbWbcDl%252B9NXi%252Fqp2bIKIn9DEoRK2Vb0Lvy9%252BlOMfvhK50kDvFrAK%252F%252B5v3iQlYKO5rOsGxTXAwUM5xZUmPXEFLHSg2AOSmbJkLGTy7ZmVBnMt84%252BBPkG44b7q0e51wo6v o8FJUFeoWax4jA%252FNQ9RTm6y2fC8Npore5MikTveJh33gOdm%252BYliUa4d0Yby%252BvhRFwS401iKl2nAar9KdkVNY9sO5sA1PIAIwvfoSYdSOPOJWPjD0OvUnc2%252FFqww3%252FqUgvQjFBYhqRd9WyeXyGU8cg0QWuavHbTQR2n%252Bgg%252FvChRyB5RGu5jOoPUFc%252B3oWzAtm%252FegvJB9%252BQ8LzMoqNZx3wh%252B2bNfjFdrPEJbHYqWNeriQEHhX5VKZWEmPNM%252BToD4USj405HEDEmkudRenDFNUclIulDIhgvAoFmX2uEFBidLCxnTvZGwrTY6JRUETdfLDWGomTanzNj4nDIJI1DeWIiyGbpewX9NyqAcOzxHXwjVf2%252BXe6myC5mJIvladYghmcOb7pXTd7Dsr1l1clyI1mKs1EMq9FcyZX1fwrFjZZZdA6A32bWDVGXvicN5zey6gUWfLmQY0tAJycmV7R8wJxOdHQRuIDwcXEPXwXYSxg9ZtyA%252BfN707eFo0kP,引荐:https://consent.live.com/pp700/Delegation.aspx?ps= Contacts.View& ru =< RETURNURLREMOVEDBYMEFORPRIVACY>& pl =< POLICYURLREMOVEBYMEFORPRIVACY>& rollrs = 04& wa = wsignin1.0
据我所知,DelAuth SDK存在问题处理正在传递的同意令牌。我不知道为什么会这样。
有没有人对此提出任何建议或建议?
Hi all, I'm using the Delegated Auth SDK to access the Windows Live Contacts API but I am having some problems. I initially set up the problem code in question a few months ago. At that point in time, everything was working fine. I was able to authentication and access the contacts API. Since then some changes have occurred in the code in question has moved to a different domain. Since that happened DelAuth has been having issues.
My initial though was: Oh, obviously, I've changed the domain so the old Service data is invalid. So I used the Live Services portal and removed the service, then added a new one for the new domain. I the updated my settings and tested. However, instead of working I was informed that Windows Live was unable to share data with my application. The
URL of the error display was of the form: https://consent.live.com/pp650/Error.aspx?mkt=en-ZA&ErrorCode=3007&Detail=0x80045a92&ru=<RETURNURL>. Consulting the DelAuth docs, I found that error code 3007 corresponds to: "Consent Service API failed in the <method name> method. The application verifier is invalid.
The offer security level requires that a valid application verifier be passed with the request."
Unfortunately, I have no idea why this is happened. I double-checked the ReturnUrl as a search for data on error 3007 reveleaed that an incorrect ReturnUrl can cause this problem but my ReturnUrl is fine and the error persists.
Following that, I found that by instructing the PHP API to use Non-Provisions DelAuth ($this->objLiveLogin->setForceDelAuthNonProvisioned(true);)
I no longer recieve the 3007 I was POSTed back to my ReturnUrl page. Checking the POST Data, I recieved the following from DelAuth:
ConsentToken | eact%3DxXLLlwEZQZot7hWm12QkfOYy0SgxVnlOjExjKoPVvIflDNJ%252Byh0bOQO4aJvVUJCHgIikvy2lorfYtZ3xx6XD57LP8qkv %252FSld1SvtTCH6FHemqezhFaAreUQsHg1fTyYmtwBhrzRhTsgV2d%252BT1JtELgfmNgZoHyFBbZJs4kEsbuMPWRKhFfRVhcC6XiplkTgr4YzeWw91YAxPYSxIILhbiGiVAlXES %252BpzpZzB5uT7BQnJcuhgu6qp%252FeGXqD1KrduW17cqNFLY%252FC7BP%252FyBEO7QFiNAJHtyfdXA0vsvKo9T4I1zZLKlcbjPuFjG %252F%252BdADZ4ZncuILwd9PRB9%252BwtROwoACgE2leD3C%252FANWB8gAHtH4SDcCEvLdvRpKOogJrrUp6Corco0b3NtCgKG9PBYAbN2V %252Fld6dxP2uLlslWIxxXwbQD2LmJvcdlkboWCa86HFMDH6lELBOOVHCjBG0An4AFNfRd%252Bm8bA0gR3QksRTfzWAio76l0oyxx41cBpFi5vyP2cGjYmc4Jd9NiRWKrFDuxPjZSacJFFlyJkrpF7E6sGsMkRYhC7gg3sUI %252ByA8UhdjX7kl8ENktt1n1e2IAZbHPMdGJlv%252BETT%252BRGsBTq9ysXPk21lucd8Y3yxjbzyEpZIidAw%252FwDxf4DbWbcDl %252B9NXi%252Fqp2bIKIn9DEoRK2Vb0Lvy9%252BlOMfvhK50kDvFrAK%252F%252B5v3iQlYKO5rOsGxTXAwUM5xZUmPXEFLHSg2AOSmbJkLGTy7ZmVBnMt84 %252BBPkG44b7q0e51wo6vo8FJUFeoWax4jA%252FNQ9RTm6y2fC8Npore5MikTveJh33gOdm%252BYliUa4d0Yby%252BvhRFwS401iKl2nAar9KdkVNY9sO5sA1PIAIwvfoSYdSOPOJWPjD0OvUnc2 %252FFqww3%252FqUgvQjFBYhqRd9WyeXyGU8cg0QWuavHbTQR2n%252Bgg%252FvChRyB5RGu5jOoPUFc%252B3oWzAtm%252FegvJB9 %252BQ8LzMoqNZx3wh%252B2bNfjFdrPEJbHYqWNeriQEHhX5VKZWEmPNM%252BToD4USj405HEDEmkudRenDFNUclIulDIhgvAoFmX2uEFBidLCxnTvZGwrTY6JRUETdfLDWGomTanzNj4nDIJI1DeWIiyGbpewX9NyqAcOzxHXwjVf2 %252BXe6myC5mJIvladYghmcOb7pXTd7Dsr1l1clyI1mKs1EMq9FcyZX1fwrFjZZZdA6A32bWDVGXvicN5zey6gUWfLmQY0tAJycmV7R8wJxOdHQRuIDwcXEPXwXYSxg9ZtyA %252BfN707eFo0kP |
ResponseCode | RequestApproved |
action | delauth |
appctx |
Unfortunately, the processConsent() in the PHP API rejects this consent data. Specifically, I recieve the following output in my logs:
Fri Jan 15 14:50:46 2010] [error] [client 41.185.111.113] ERROR: validateToken: Invalid token: \xe5\xde\x84\x8e\x04\x05\xafX\xac\x19{\xe3\xec'\xbf\xa9\x9a\x9c\xbe\xcbp2\xb1\b\xab\x89\xb5\x90\xe0\x1f\xc4H\x86\xca\xac\xdd'u\x93\xfb\xcal\x9a\x86\x07\x8b)n\x83_\xb6\x7f\x17B\xee,\x0f!\xe0\xb3\xb7\x06h\xc2\xff\xcaYw\xb6:\x92C3Y\xd7\x9cj\xd4\xcb\xa4\x8c3\x8f%\xdb\xf5A4s\\8O\xeb\xc7\x03XW\xf0\xef\xb26\xe7\x96)n\xbb\xdc\xc4(v\xd6Q\xba\x9d:\x96\xa4\xec\x95\x042M9\x14\x82\xddL;\xfcm\xb1^I, referer: https://consent.live.com/pp700/Delegation.aspx?ps=Contacts.View&ru=<RETURNURLREMOVEDBYMEFORPRIVACY>&pl=<POLICYURLREMOVEBYMEFORPRIVACY>&rollrs=04&wa=wsignin1.0
[Fri Jan 15 14:50:46 2010] [error] [client 41.185.111.113] Error: processConsentToken: Failed to decode/validate token: eact%3DxXLLlwEZQZot7hWm12QkfOYy0SgxVnlOjExjKoPVvIflDNJ%252Byh0bOQO4aJvVUJCHgIikvy2lorfYtZ3xx6XD57LP8qkv%252FSld1SvtTCH6FHemqezhFaAreUQsHg1fTyYmtwBhrzRhTsgV2d%252BT1JtELgfmNgZoHyFBbZJs4kEsbuMPWRKhFfRVhcC6XiplkTgr4YzeWw91YAxPYSxIILhbiGiVAlXES%252BpzpZzB5uT7BQnJcuhgu6qp%252FeGXqD1KrduW17cqNFLY%252FC7BP%252FyBEO7QFiNAJHtyfdXA0vsvKo9T4I1zZLKlcbjPuFjG%252F%252BdADZ4ZncuILwd9PRB9%252BwtROwoACgE2leD3C%252FANWB8gAHtH4SDcCEvLdvRpKOogJrrUp6Corco0b3NtCgKG9PBYAbN2V%252Fld6dxP2uLlslWIxxXwbQD2LmJvcdlkboWCa86HFMDH6lELBOOVHCjBG0An4AFNfRd%252Bm8bA0gR3QksRTfzWAio76l0oyxx41cBpFi5vyP2cGjYmc4Jd9NiRWKrFDuxPjZSacJFFlyJkrpF7E6sGsMkRYhC7gg3sUI%252ByA8UhdjX7kl8ENktt1n1e2IAZbHPMdGJlv%252BETT%252BRGsBTq9ysXPk21lucd8Y3yxjbzyEpZIidAw%252FwDxf4DbWbcDl%252B9NXi%252Fqp2bIKIn9DEoRK2Vb0Lvy9%252BlOMfvhK50kDvFrAK%252F%252B5v3iQlYKO5rOsGxTXAwUM5xZUmPXEFLHSg2AOSmbJkLGTy7ZmVBnMt84%252BBPkG44b7q0e51wo6vo8FJUFeoWax4jA%252FNQ9RTm6y2fC8Npore5MikTveJh33gOdm%252BYliUa4d0Yby%252BvhRFwS401iKl2nAar9KdkVNY9sO5sA1PIAIwvfoSYdSOPOJWPjD0OvUnc2%252FFqww3%252FqUgvQjFBYhqRd9WyeXyGU8cg0QWuavHbTQR2n%252Bgg%252FvChRyB5RGu5jOoPUFc%252B3oWzAtm%252FegvJB9%252BQ8LzMoqNZx3wh%252B2bNfjFdrPEJbHYqWNeriQEHhX5VKZWEmPNM%252BToD4USj405HEDEmkudRenDFNUclIulDIhgvAoFmX2uEFBidLCxnTvZGwrTY6JRUETdfLDWGomTanzNj4nDIJI1DeWIiyGbpewX9NyqAcOzxHXwjVf2%252BXe6myC5mJIvladYghmcOb7pXTd7Dsr1l1clyI1mKs1EMq9FcyZX1fwrFjZZZdA6A32bWDVGXvicN5zey6gUWfLmQY0tAJycmV7R8wJxOdHQRuIDwcXEPXwXYSxg9ZtyA%252BfN707eFo0kP, referer: https://consent.live.com/pp700/Delegation.aspx?ps=Contacts.View&ru=<RETURNURLREMOVEDBYMEFORPRIVACY>&pl=<POLICYURLREMOVEBYMEFORPRIVACY>&rollrs=04&wa=wsignin1.0
As far as I can tell, the DelAuth SDK is having issues processing the consent token it's being passed. I have no idea why though.
Does anyone have any advice or suggestions with regards to this?
推荐答案
虽然我们仍在测试我们的代码但它工作正常,但同意服务器发布了一个不安全的令牌(delt = xxx)。当我们转移到我们的暂存和实时环境时,回发的令牌包含"eact = xx";表示它是一个安全的
令牌。
While we were still testing our code it worked fine, but the consent server posted an insecure token back (delt=xxx). When we moved to our staging and live environment, the token that was posted back contained "eact=xx" indicating that it's a secure token.
然后处理此安全令牌,我看到以下错误:"错误:decodeToken:尝试解码无效令牌。"
This secure token then gets processed and I see the following error: "Error: decodeToken: Attempted to decode invalid token."
一些调查导致怀疑urldecode()曾被调过太多;但是当我改变这个时,错误就变成了"ERROR:validateToken:无效的令牌:xxx"
Some investigation led to suspect that urldecode() was called once too many; but when I changed this, the error turned into "ERROR: validateToken: Invalid token: xxx"
这里被困的类别:(
这篇关于使用PHP SDK委派身份验证问题...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!