'Check if user object meets all the criteria.'

def assertValidMappedUser(self, token):

    user = token['user']
    self.assertIn('id', user)
    self.assertIn('name', user)
    self.assertIn('domain', user)
    self.assertIn('groups', user['OS-FEDERATION'])
    self.assertIn('identity_provider', user['OS-FEDERATION'])
    self.assertIn('protocol', user['OS-FEDERATION'])
    self.assertEqual(urllib.parse.quote(user['name']), user['name'])
