Ejemplo n.º 1
0
 /// <summary>
 /// Authorize request
 /// </summary>
 /// <param name="actionContext"></param>
 /// <returns></returns>
 private bool AuthorizeRequest(HttpActionContext actionContext)
 {
     try
     {
         var token = actionContext.Request.Headers.FirstOrDefault(x => x.Key == _securityToken).Value;
         return(TokenValidator.IsValidToken(token.First()));
     }
     catch (Exception)
     {
         return(false);
     }
 }