I am hostin WCF service in IIS and I am using basic authorization. As IIS is performing the authorization, my WCF service has no ability to tell if particular user is allowed or not. Unfortunately, I have to support a list of enabled user names. The service and the metadata must be available only for the users on the list, and not the others. How is this possible, using only basic authorization? Message authorization is not an option, as I have no control on the service consumers.
Clarification: I can assign Windows users to the service, restricting access to specific group. What I want to achieve is to allow the service programatically restrict access to specific users. The naive approach using UserNamePasswordValidator can not be used, since IIS is performing the authentication on its own.