带有cookie的承载令牌认证 [英] Bearer token authentication with cookie

查看:151
本文介绍了带有cookie的承载令牌认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Cookie在我的asp.net mvc应用程序中存储承载令牌,并且希望对Cookie进行每次身份验证以进行客户端身份验证(我不想添加"Autentication" 前端的每个请求的标头). 我该如何实施?谢谢.

I want to use Cookie for storing bearer token in my asp.net mvc application and I want that Cookie will be checked per request for client authentication (I don't want to add "Autentication" header for each request on the front-end). How can I implement it? Thank you.

推荐答案

您可以创建一个cookie提供程序来处理授权.检查一下 https://alexdunn .org/2017/03/31/asp-net-tips-using-bearer-tokens-as-a-cookie/

You can create a cookie provider to handle Authorization. Check this https://alexdunn.org/2017/03/31/asp-net-tips-consuming-bearer-tokens-as-a-cookie/

这篇关于带有cookie的承载令牌认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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