Think about a service like IfThisThenThat (IFTTT.com). In there, I authenticate against services (twitter, evernote, gmail, dropbox etc) and authorize IFTTT to act on my behalf (presumably by storing a token of some sort). I can revoke the token any time I want, if I no longer want to authorize IFTTT to impersonate me.
What if I wanted to do the same thing with windows authentication for internal services?
I imagine the user would visit a web page using windows authentication - and approve creating of some sort of token, that I can persist in a database. Then later, when I need to run something in the context of that user (like an internal web service), I would take the token and run some kind of impersonation code (trivial at least when you know the password).
What technology/concepts would be a good way to do this?