resource is now a friend of identity to get access to the id field