title: Need to pass additional value to UserNameSecurityToken in STS from client application
body: <p>I have incorporate security into my wcf service using wif. Below my high level design.</p>
  
  <ol>
  <li>Wif sts application - Here i have used custom username security token handler for validate the usename &amp; passsword</li>
  <li>Wcf service - list of services</li>
  <li>Web application -> where i consumed the wcf service.</li>
  </ol>
  
  <p>STS custom username security token handler as follows:</p>
  
  <pre><code>public class CustomUserNameSecurityTokenHandler : UserNameSecurityTokenHandler
  {
      public override Microsoft.IdentityModel.Claims.ClaimsIdentityCollection ValidateToken(System.IdentityModel.Tokens.SecurityToken token)
      {
          UserNameSecurityToken userNameToken = token as UserNameSecurityToken;
          CredentialStore.AuthenticateUser(userNameToken.username, userNameToken.Password);
  
          // ...
      }
  }
  </code></pre>
  
  <p>Code to consume the wcf service from web application</p>
  
  <pre><code>ClientCredentials oldCredentials = client.Endpoint.Behaviors.Remove&lt;ClientCredentials&gt;();
  CachedClientCredentials newCredentials = new CachedClientCredentials(_tokenCache, oldCredentials);
  
  client.Endpoint.Behaviors.Add(newCredentials);
  
  client.ClientCredentials.UserName.UserName = "Admin"
  client.ClientCredentials.UserName.Password = "password";
  
  client.Authenticate();
  </code></pre>
  
  <p>While consume the wcf service i am able to send the username and password to STS validateToken method for authenticate and my scenario is like i want to send one more value (current web site address) to validatetoken method from consume part. i have workaround to send the additional value part of username but that is not the good idea to do that.</p>
  
  <p>So could you please help me to resolve my issue?</p>