MVC在http标头中添加令牌 [英] MVC add token in http header

查看:159
本文介绍了MVC在http标头中添加令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个调用WCF服务的.NET MVC应用程序。我需要在MVC应用程序的HTTP头中包含一个JWT令牌,并在WCF应用程序中解码令牌。
绑定是basicHttpBinding。我将不胜感激任何建议...

I have a .NET MVC application which is calling a WCF service. I need to include a JWT token in the HTTP header of the MVC application and decode the token in the WCF application. The binding is basicHttpBinding. I would appreciate any suggestions...

提前致谢

推荐答案

我终于设法找到了一个解决方案,我通过SOAP标头发送了令牌。

I finally managed to find a solution and I've sent the token through a SOAP header.

为此我只需要添加

<headers>
<headerName>Value</headerName>
</headers>

这篇关于MVC在http标头中添加令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆