来自卖方仪表板的ID /机密未验证上下文令牌 [英] ID/Secret from Seller Dashboard not verifying context tokens
问题描述
您好,
我遇到了SharePoint提供商托管应用程序的问题。
I am having an issue with a provider hosted app for SharePoint.
出于某些原因,当我使用OAuth ID / Secret时,我从卖家仪表板获取我使用我的应用程序时出现以下错误...即上下文令牌被验证时。
For some reason when I use an OAuth ID/Secret I obtain from the Seller Dashboard I get the following error using my app ... i.e. when the Context Token is validated.
[SecurityTokenException: Invalid issuer or signature.]
Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.VerifySignature(String signingInput, String signature, String algorithm, SecurityToken signingToken) +873
Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.ReadTokenCore(String token, Boolean isActorToken) +498
Microsoft.IdentityModel.S2S.Tokens.JsonWebSecurityTokenHandler.ReadToken(String token) +7
ShareIt.PostAppWeb.Helpers.TokenHelper.ReadAndValidateContextToken(String contextTokenString, String appHostName) +32
ShareIt.PostAppWeb.Helpers.TokenHelper.GetClientContextWithContextToken(String targetUrl, String contextTokenString, String appHostUrl) +18
然而,当我使用ID / Secret组合时,我使用AppRegNew.aspx在我的开发者网站上创建...一切正常。
However, when i use an ID/Secret combo I create in my developer site using AppRegNew.aspx ... everything works as expected.
我已经检查过ID /机密设置是否正确web.config并通过将它们输出到测试页面100%确定来验证这一点。
I have checked that the ID/Secret are being set correctly the web.config and verified this by outputting them to a test page to be 100% sure.
任何想法?
推荐答案
你好Chris,
Hi Chris,
我们对此进行了一些研究,这实际上比我们在这个论坛上做的更多的编码问题(更多与出版有关)和验证)。因此,我将其转移到开发应用程序for SharePoint论坛:
We looked into this a bit and this is actually more of a coding issue than what we do on this forum (more related to publishing and validation). So I'll move this to the Developing Apps for SharePoint forum:
http://social.msdn.microsoft.com/Forums/en-US/appsforsharepoint/threads
谢谢,
Jes
这篇关于来自卖方仪表板的ID /机密未验证上下文令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!