This should probably be in the Identity Model jar so other clients can use it (there's nothing Frontend-specific about it).