在webapi中授予页面访问权限运行时 [英] Give page access permissinon runtime in webapi

查看:152
本文介绍了在webapi中授予页面访问权限运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友



我只想在web api中使用授权..我想根据用户管理工作从前端授权页面。我无法理解这样做。比如

[授权(Reole ='Admin')]。我想通过管理员运行时间。请帮助



我尝试过的事情:



Dear Friends

I just want to use Authorization in web api.. I want to give permission on page from front end as per User Management work. I am not able to understand to do that. Like
[Authorization(Reole='Admin')]. Where i want to pass admin run time. Please help

What I have tried:

I just want to use Authorization in web api.. I want to give permission on page from front end as per User Management work. I am not able to understand to do that. Like
[Authorization(Reole='Admin')]. Where i want to pass admin run time. Please help

推荐答案

你应该从这些开始。



1。 ASP.NET Web API中的身份验证和授权 [ ^ ]

2. 保护并安全地调用Web API和[授权] [ ^ ]
You should start from these.

1. Authentication and Authorization in ASP.NET Web API[^]
2. Securing and securely calling Web API and [Authorize][^]


这篇关于在webapi中授予页面访问权限运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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