如何解决C# BasicAuthentication 实现方式
我正在考虑使用 .Net 创建一个 web api 应用程序。这是我正在考虑如何实现这一点。
The application will be serving clients who's credentials I will create separately.
These credentials will be encrypted using my own private key.
I will provide them this encrypted text.
They will use this encrypted text in the Authorization header.
On the server I will implement an AuthorizationFilterAttribute.
In here I will decrypt and validate the user.
And allow it to go to the resource.
老实说,我没有深入了解这个话题。因此,我想知道我的方法是否有效。 在我的测试中,我看到所有请求都命中了 AuthorizationFilterAttribute,这意味着我将有机会检查每个请求的凭据。 不记名令牌可能不起作用,因为我需要(我的理解)至少 2 个请求,一个是获取令牌,另一个是获取实际资源。请指导。 谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。