Why did you remove/rewrite this code? It existed to solve some problems between the UUID tokens and PKI tokens in Keystone (particularly related to the length of what we have to store in the session on the Horizon side), and I'm not clear that it's no longer needed...