Derek Gusoff is correct while it is possible, I would never recommend setting something like this up.
Please let me know what the requirements are for your solution and what you are trying to accomplish. There maybe an easier solution.
I can think of a few ways to technically do this but none of them are good ideas, so I'm just going to say, no, you cannot do this.
Honestly I can't think of any reason why you'd want to introduce massive potential failure points to replicate such a critical feature that you get free out of the box.