diff --git a/Step/Attributes/WebApiAuthorizeAttribute.cs b/Step/Attributes/WebApiAuthorizeAttribute.cs index fc41d4b9..f8a71b45 100644 --- a/Step/Attributes/WebApiAuthorizeAttribute.cs +++ b/Step/Attributes/WebApiAuthorizeAttribute.cs @@ -22,6 +22,9 @@ namespace Step protected override bool IsAuthorized(HttpActionContext actionContext) { // Get token from headers + if (actionContext.Request.Headers.Authorization == null) + return false; + string token = actionContext.Request.Headers.Authorization.ToString();