MVC中的JWT身份验证 [英] JWT authentication in MVC

查看:289
本文介绍了MVC中的JWT身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我是mvc中JWT认证的新手。



我的方案是:



SiteA有一个名为Vendor Details的按钮,当用户点击按钮时,siteA通过传递Jwt令牌来呼叫B站点



和SiteB是MVC应用程序。



我需要验证jwt令牌并允许用户访问SiteB中的操作。



你能用这个场景帮我验证jwt令牌并允许用户访问mvc应用程序中的动作



我尝试了什么:



我试图在google中使用jwt authenticnticaion进行搜索,但获得了如何在.net中生成jwt令牌的示例。但我需要验证来自另一个站点的jwt令牌,并允许用户访问mvc应用程序中的操作。

Hi Everyone,

I am new to JWT Authentication in mvc.

my scenario is:

SiteA has a button called Vendor Details and when user clicked on button the siteA is calling Site B by passing Jwt token

and SiteB is MVC application.

I need to validate that jwt token and allow the user to access actions in SiteB.

can you help me with this scenario to validate the jwt token and allow the users to access the actions in mvc application

What I have tried:

I tried to search with jwt authenticaion in google but got the examples on how to generate jwt token in .net. but i need to validate the jwt token which is coming from another site and allow the user to access the actions in mvc applicaiton.

推荐答案

使用 Identity Server 3或4 这更灵活,有更多选项。
Use Identity Server 3 or 4 this is more flexible and has more options.


这篇关于MVC中的JWT身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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