This is a migrated thread and some comments may be shown as answers.

MVC user Authentication using Web API

1 Answer 151 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
KIM
Top achievements
Rank 1
KIM asked on 29 Oct 2014, 09:13 PM
Hi Guys,

I have built a WebAPI for user login, the webAPI can generate Access Token, if the user provided correct UserName and password. My Question is how I can pass user role information to the MVC application also.

For example,

I have a MVC app controller below, how can I pass the role 'Admin, UserEditor' from the Web API? I know I can use another WebAPI call to check user role, but it is not a good idea to do it. 

[Authorized("Admin,UserEditor")]
ActionResult EditUser(int? Id)
{
........
}  

Best Regards,
KIM

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 31 Oct 2014, 04:09 PM
Hello Kim,

The question that you does not seem to be related to the KendoUI framework but to general ASP.NET MVC development. Let us know if you have question regarding the Kendo UI framework.

Kind Regards,
Petur Subev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
KIM
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or