¿Cómo implementaría la clave API en WCF Data Service?

¿Hay alguna manera de requerir una clave API en la URL / o alguna otra forma de pasar una clave privada al servicio para otorgar acceso a los datos?

Tengo esto ahora ...

using System;
using System.Data.Services;
using System.Data.Services.Common;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Web;
using Numina.Framework;
using System.Web;
using System.Configuration;

[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
public class odata : DataService {


    public static void InitializeService(DataServiceConfiguration config) {

        config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
        //config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
        config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
    }

    protected override void OnStartProcessingRequest(ProcessRequestArgs args) {

        HttpRequest Request = HttpContext.Current.Request;
        if(Request["apikey"] != ConfigurationManager.AppSettings["ApiKey"])
            throw new DataServiceException("ApiKey needed");

        base.OnStartProcessingRequest(args);
    }
} 

... Esto funciona pero no es perfecto porque no puede acceder a los metadatos y descubrir el servicio a través del explorador Agregar referencia de servicio. Podría verificar si $ metadata está en la URL pero parece un truco. ¿Hay una mejor manera?

Respuestas a la pregunta(3)

Su respuesta a la pregunta