I am doing Token Based Authentication Web API in ASP.NET Core using jwt. I can't understand why we need to use Bearer keyword in [Authorize("Bearer")]
attribute on above the action method for authorization and i am not be able to do authorization role base or simple as in attached screenshot.
see the below code
// GET api/values
[Authorize("Bearer")]
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
i am following this link to do the authorization