How can I use both jwt auth handler and regular authorize attribute in my web api method?
I'm getting 401 response if I don't provide JWT token, but I'm calling the method inside DNN module.
Here's the method:
[DnnAuthorize(AuthTypes = "JWT")] [DnnModuleAuthorize(AccessLevel = SecurityAccessLevel.View)]
[HttpGet]
public IHttpActionResult GetSettings(int portalId, string keyword = "")
{
try
{
var result = new APIResponse();
result.Data = _settingSvc.GetSettings(portalId, keyword);
return Ok(result);
}
catch (Exception ex)
{
return InternalServerError(ex);
}
}