You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2018. It is now read-only.
I want to impliment role based authentication in my web Api projetc
i had added scope with the name of role and assigned with admin,user,superadmin
in my controller used
[Route("getallsupportcategorieslu")] [Authorize(Roles ="admin")]
public IHttpActionResult GetAllSupportCategoriesLU()
{
try
{
return Ok(_supportApplicationService.GetAllSupportCategoriesLU());
}
catch (Exception ex)
{
return BadRequest(ex.Message);
}
}
but it is not working
we are using bearer token. client side we are using angulr js they pass bearer token.
token authentication is working fine. but role based authentication not working.
can you please provide the sollution for any code needed for role based authentication and how to pass the roles in bearer token and how i can get the roles for authentication.
The text was updated successfully, but these errors were encountered:
I want to impliment role based authentication in my web Api projetc
i had added scope with the name of role and assigned with admin,user,superadmin
in my controller used
[Route("getallsupportcategorieslu")]
[Authorize(Roles ="admin")]
public IHttpActionResult GetAllSupportCategoriesLU()
{
try
{
return Ok(_supportApplicationService.GetAllSupportCategoriesLU());
}
catch (Exception ex)
{
return BadRequest(ex.Message);
}
}
but it is not working
we are using bearer token. client side we are using angulr js they pass bearer token.
token authentication is working fine. but role based authentication not working.
can you please provide the sollution for any code needed for role based authentication and how to pass the roles in bearer token and how i can get the roles for authentication.
The text was updated successfully, but these errors were encountered: