I implemented a WCF service using custom authentication, it works fine when i pass a constant string of username and password into UsernameAuthentication class, Validate method and validate it there. But is there a way i can pass Dynamic Username, password and validate them. How can i implement this and access those values in this class.
class UsernameAuthentication : UserNamePasswordValidator
{
public override void Validate(string userName, string password)
{
var ok = (userName == "DynamicUserName") && (password == "DynamicPassWord");
if (ok == false)
throw new AuthenticationException("u/p does not match");
}
}