I'm working on a Vue Js Application with Netcore 2.0 and Azure AD for Authentication, I already Add Authentication to my app and I'm using authorization to allow access to to the different controllers of my API.
My HomeController is using the Authorize method which forces all users to log in using their Ad Credentials.
My Question from my Vue app how can I say
If this user is in X group not show this option on the menu or do not allow access to this view.
Any good examples of an Authorization service.
StartUP.cs
.AddMvc();
services.AddAuthorization(options =>
{
}
HomeController Example
//[Microsoft.AspNetCore.Authorization.Authorize]
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}
public IActionResult Error()
{
return View();
}
}
Router JS Example (How can I filter if the user is not "basusers" not show admin menu and not give access.)
export const routes = [
nent: Application }
]