Пример #1
0
 protected override Tuple <bool, string> IsAuthorized(HttpActionContext actionContext)
 {
     try
     {
         return(JwtAuthHelper.IsAuthenticatedJwtRequest(actionContext)
             ? new Tuple <bool, string>(true, string.Empty)
             : base.IsAuthorized(actionContext));
     }
     catch (Exception e)
     {
         return(new Tuple <bool, string>(false, e.Message));
     }
 }
 protected override bool SkipAuthorization(HttpActionContext actionContext)
 {
     return(JwtAuthHelper.IsAuthenticatedJwtRequest(actionContext) || base.SkipAuthorization(actionContext));
 }