code: def authenticate_swift_user(self, keystone, user, password, tenant):
          
          self.log.debug('Authenticating swift user ({})...'.format(user))
          ep = keystone.service_catalog.url_for(service_type='identity',
                                                interface='publicURL')
          if keystone.session:
              return swiftclient.Connection(session=keystone.session)
          else:
              return swiftclient.Connection(authurl=ep,
                                            user=user,
                                            key=password,
                                            tenant_name=tenant,
                                            auth_version='2.0')
docs: Authenticates a regular user with swift api.