MCPcopy Create free account
hub / github.com/KDE/kdevelop / revokeAccess

Method revokeAccess

plugins/ghprovider/ghresource.cpp:81–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void Resource::revokeAccess(const QString &id, const QString &name, const QString &password)
82{
83 QUrl url = baseUrl;
84 url.setPath(url.path() + QLatin1String("/authorizations/") + id);
85 KIO::TransferJob *job = KIO::http_delete(url, KIO::HideProgressInfo);
86 const auto passwordBase64 = QString::fromLatin1(QString(name + QLatin1Char(':') + password).toUtf8().toBase64());
87 job->addMetaData(QStringLiteral("customHTTPHeader"), QLatin1String("Authorization: Basic ") + passwordBase64);
88 /* And we don't care if it's successful ;) */
89 job->start();
90}
91
92KIO::TransferJob * Resource::getTransferJob(const QString &path, const QString &token) const
93{

Callers

nothing calls this directly

Calls 4

QStringClass · 0.50
setPathMethod · 0.45
pathMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected