title: Accessing WCF client credentials from the service
body: <p>I have the following call to a WCF service (using basic authentication):</p>
  
  <pre><code>client.ClientCredentials.UserName.UserName = "username";
  client.ClientCredentials.UserName.Password = "password";
  
  client.MyServiceFunction();
  </code></pre>
  
  <p>On the server, I have:</p>
  
  <pre><code>class MyService : IMyService
  {
      string MyServiceFunction()
      {
           return GetUsernameHere();
      }
  }
  </code></pre>
  
  <p>My question is, can I access these credentials in the WCF service and, if so, how?  That is, how would I implement the <code>GetUsernameHere</code> function?</p>