Adding a shared identity parsing function