如何在Asp.Net MVC和Web API 2中创建用于身份验证的令牌 [英] How to Cretae token for authentication in Asp.Net MVC and Web API 2

查看:74
本文介绍了如何在Asp.Net MVC和Web API 2中创建用于身份验证的令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个web api2应用程序。我想为身份验证生成令牌...我如何创建令牌进行身份验证??????????



你能提供样本吗?这..............基于令牌的身份验证是否需要OWIN .... ?????????????????????????????????解决方案

在我的上一个项目中,我使用了Taiseer Joudeh所描述的非常好的机制:



http://bitoftech.net/2014/06/ 09 / angularjs-token-authentication-using-asp-net-web-api-2-owin-asp-net-identity / [ ^ ]



这很完美!


Hi,

I have a web api2 application. I would like to generate token for authentication... How can i create token for authentication??????????

Could you provide a sample for this............. Whether OWIN is needed for token based authentication....????????????????

解决方案

In my last project I used the mechanisme which Taiseer Joudeh described very good on:

http://bitoftech.net/2014/06/09/angularjs-token-authentication-using-asp-net-web-api-2-owin-asp-net-identity/[^]

This works perfect!


这篇关于如何在Asp.Net MVC和Web API 2中创建用于身份验证的令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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