Skip to content
This repository has been archived by the owner on Feb 15, 2018. It is now read-only.

Role based Authentication #269

Open
avinash14221422 opened this issue Jun 27, 2017 · 1 comment
Open

Role based Authentication #269

avinash14221422 opened this issue Jun 27, 2017 · 1 comment

Comments

@avinash14221422
Copy link

avinash14221422 commented Jun 27, 2017

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.

@danielboterocorrea
Copy link

danielboterocorrea commented Sep 7, 2017

Use JWT webpage to see what the token has inside

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants