Michael and me did some work on ding_wayf maybe you can use some of it

loads of testing
new ding_wayf_login_method
some validating
etc..