問(wèn)題描述
我有一個(gè)簡(jiǎn)單的 Windows 窗體應(yīng)用程序來(lái)試用 Live Connect 和 Azure 移動(dòng)服務(wù).不是 Windows 8 現(xiàn)代應(yīng)用程序.
I have a simple Windows Forms Application to try Live Connect and Azure Mobile Services. Not a Windows 8 Modern App.
我正在嘗試為 Live Connect 使用一些示例代碼,并且能夠讓登錄部分正常工作.最后我在登錄后得到一個(gè)access_token.
I'm trying to make use of some sample code for Live Connect and have been able to get the sign-in part to work fine. In the end I get an access_token after signing in.
在同一 Windows 窗體應(yīng)用程序的移動(dòng)服務(wù)端,我正在嘗試使用 REST 登錄.但是,我似乎收到401 Unauthorized"響應(yīng),因?yàn)樯矸蒡?yàn)證令牌的簽名格式錯(cuò)誤或由不同的密鑰簽名"
On the Mobile Services side in the same Windows Forms Application, I'm trying to use REST to login. However, I seeem to get an "401 Unauthorized" response because "The authentication token's signature was malformed or signed by a different key"
JWT 似乎有兩個(gè) '.'在令牌中.SWT 似乎有 '/'、'+' 和 '='
JWT seem to have two '.' in the token. SWT seem to have '/', '+' and '='
我需要進(jìn)行轉(zhuǎn)換嗎?
有沒有辦法配置 Live Connect,以便返回的身份驗(yàn)證令牌是 JWT(或任何移動(dòng)服務(wù)期望的)?
Is there a way to configure Live Connect so that the authentication token returned is JWT (or whatever Mobile Services expects)?
我已經(jīng)檢查了 Live Connect 和 Mobile Services 上的客戶端密碼,它們是正確的.
I've check the client secret on both Live Connect and Mobile Services, and they are correct.
推薦答案
正如@carlosfigueira 所指出的,在 Live Connect 開發(fā)者中心,您的應(yīng)用需要在重定向域字段中有一些東西.它可以是一個(gè)虛擬 URI.
As pointed out by @carlosfigueira, in the Live Connect Developer Center, your app needs to have something in the redirect domain field. It can be a dummy URI.
此處的答案得到證實(shí):http://social.msdn.microsoft.com/Forums/en-US/messengerconnect/thread/4a110db0-6468-44fb-9152-771987ded050
這篇關(guān)于用于 Azure 移動(dòng)服務(wù) (REST) 的 Live Connect 身份驗(yàn)證令牌的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!