def authentication()

in src/pydolphinscheduler/resources_plugin/gitlab.py [0:0]


    def authentication(self):
        """Gitlab authentication."""
        host = self._git_file_info.host
        if self.private_token is not None:
            return gitlab.Gitlab(host, private_token=self.private_token)
        if self.oauth_token is not None:
            return gitlab.Gitlab(host, oauth_token=self.oauth_token)
        if self.username is not None and self.password is not None:
            oauth_token = self.OAuth_token()
            return gitlab.Gitlab(host, oauth_token=oauth_token)
        return gitlab.Gitlab(host)