/// <summary> /// Variant that returns also information if any key was provided /// </summary> public static AuthenticationResult HasAuthenticatedAccessKeyExtended(this HttpContext context, AccessKeyType requiredAccess) { var key = context.AuthenticatedAccessKey(); if (key == null) { return(AuthenticationResult.NoUser); } if (key.KeyType != requiredAccess) { return(AuthenticationResult.NoAccess); } return(AuthenticationResult.Success); }