The idea here is to abstract out all the conditional code which tests which methods a given password provider has, to provide a consistent interface.