| 79 | } |
| 80 | |
| 81 | void 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 | |
| 92 | KIO::TransferJob * Resource::getTransferJob(const QString &path, const QString &token) const |
| 93 | { |