KIOSlave
httpauthentication.cpp
Go to the documentation of this file.
79static QList<QByteArray> parseChallenge(QByteArray &ba, QByteArray *scheme, QByteArray* nextAuth = 0)
193 kDebug(7113) << "unexpected character" << b[end] << "found in WWW-authentication header where token boundary (,) was expected";
266KAbstractHttpAuthentication *KAbstractHttpAuthentication::newAuth(const QByteArray &offer, KConfigGroup* config)
357void KAbstractHttpAuthentication::generateResponseCommon(const QString &user, const QString &password)
481 authStr += resource.encodedPathAndQuery(KUrl::LeaveTrailingSlash, KUrl::AvoidEmptyPath).toLatin1();
600 if (info.digestURIs.isEmpty() /*###&& (m_request.responseCode == 401 || m_request.responseCode == 407)*/)
609 QString requestPath = m_resource.directory(KUrl::AppendTrailingSlash | KUrl::ObeyTrailingSlash);
658 auth += m_resource.encodedPathAndQuery(KUrl::LeaveTrailingSlash, KUrl::AvoidEmptyPath).toLatin1();
725 // Every auth scheme is supposed to supply a realm according to the RFCs. Of course this doesn't
727 // we don't have the username yet which may (may!) contain a domain, so we really have no choice
768 if (!KNTLM::getAuth(buf, challenge, user, m_password, domain, QLatin1String("WORKSTATION"), flags)) {
797 ret = gss_display_status(&new_status, major_status, GSS_C_GSS_CODE, GSS_C_NULL_OID, &msg_ctx, &major_string);
800 ret = gss_display_status(&new_status, minor_status, GSS_C_MECH_CODE, GSS_C_NULL_OID, &msg_ctx, &minor_string);
832void KHttpNegotiateAuthentication::generateResponse(const QString &user, const QString &password)
virtual QByteArray scheme() const =0
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
QByteArray m_scheme
this is parsed from the header and not necessarily == scheme().
Definition: httpauthentication.h:163
static QByteArray bestOffer(const QList< QByteArray > &offers)
Choose the best authentication mechanism from the offered ones.
Definition: httpauthentication.cpp:227
bool m_finalAuthStage
Definition: httpauthentication.h:173
static QList< QByteArray > splitOffers(const QList< QByteArray > &offers)
Split all headers containing multiple authentication offers.
Definition: httpauthentication.cpp:284
virtual ~KAbstractHttpAuthentication()
Definition: httpauthentication.cpp:223
void generateResponseCommon(const QString &user, const QString &password)
Definition: httpauthentication.cpp:357
QByteArray m_headerFragment
Definition: httpauthentication.h:175
bool m_forceDisconnect
Definition: httpauthentication.h:172
QList< QByteArray > m_challenge
Definition: httpauthentication.h:165
virtual QByteArray authDataToCache() const
Returns any authentication data that should be cached for future use.
Definition: httpauthentication.h:159
QByteArray m_challengeText
Definition: httpauthentication.h:164
virtual bool supportsPathMatching() const
Returns true if the authentication scheme supports path matching to identify resources that belong to...
Definition: httpauthentication.h:111
bool m_needCredentials
Definition: httpauthentication.h:170
void authInfoBoilerplate(KIO::AuthInfo *a) const
Definition: httpauthentication.cpp:345
QByteArray m_httpMethod
Definition: httpauthentication.h:167
KAbstractHttpAuthentication(KConfigGroup *config=0)
Definition: httpauthentication.cpp:217
virtual void setChallenge(const QByteArray &c, const KUrl &resource, const QByteArray &httpMethod)
initiate authentication with challenge string (from HTTP header)
Definition: httpauthentication.cpp:322
bool m_forceKeepAlive
Definition: httpauthentication.h:171
static KAbstractHttpAuthentication * newAuth(const QByteArray &offer, KConfigGroup *config=0)
Returns authentication object instance appropriate for offer.
Definition: httpauthentication.cpp:266
QString readEntry(const char *key, const char *aDefault=0) const
Definition: httpauthentication.h:183
virtual QByteArray scheme() const
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
Definition: httpauthentication.cpp:376
virtual void generateResponse(const QString &user, const QString &password)
what to do in response to challenge
Definition: httpauthentication.cpp:387
virtual void fillKioAuthInfo(KIO::AuthInfo *ai) const
KIO compatible data to find cached credentials.
Definition: httpauthentication.cpp:382
virtual void generateResponse(const QString &user, const QString &password)
what to do in response to challenge
Definition: httpauthentication.cpp:519
virtual QByteArray scheme() const
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
Definition: httpauthentication.cpp:400
virtual void setChallenge(const QByteArray &c, const KUrl &resource, const QByteArray &httpMethod)
initiate authentication with challenge string (from HTTP header)
Definition: httpauthentication.cpp:406
virtual void fillKioAuthInfo(KIO::AuthInfo *ai) const
KIO compatible data to find cached credentials.
Definition: httpauthentication.cpp:427
Definition: httpauthentication.h:223
virtual void fillKioAuthInfo(KIO::AuthInfo *ai) const
KIO compatible data to find cached credentials.
Definition: httpauthentication.cpp:722
virtual void setChallenge(const QByteArray &c, const KUrl &resource, const QByteArray &httpMethod)
initiate authentication with challenge string (from HTTP header)
Definition: httpauthentication.cpp:703
virtual QByteArray scheme() const
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
Definition: httpauthentication.cpp:697
virtual void generateResponse(const QString &user, const QString &password)
what to do in response to challenge
Definition: httpauthentication.cpp:732
QString digestInfo
QString realmValue
bool verifyPath
bool keepPassword
KUrl url
QString username
QString password
void update(const char *in, int len=-1)
QByteArray hexDigest()
void reset()
QString encodedPathAndQuery(AdjustPathOption trailing=LeaveTrailingSlash, const EncodedPathAndQueryOptions &options=PermitEmptyPath) const
ObeyTrailingSlash
AppendTrailingSlash
AvoidEmptyPath
LeaveTrailingSlash
QString directory(const DirectoryOptions &options=IgnoreTrailingSlash) const
QString protocol() const
#define kDebug
#define kWarning
static QByteArray valueForKey(const QList< QByteArray > &ba, const QByteArray &key)
Definition: httpauthentication.cpp:207
static QByteArray calculateResponse(const DigestAuthInfo &info, const KUrl &resource)
Definition: httpauthentication.cpp:450
static QList< QByteArray > parseChallenge(QByteArray &ba, QByteArray *scheme, QByteArray *nextAuth=0)
Definition: httpauthentication.cpp:79
static bool containsScheme(const char input[], int start, int end)
Definition: httpauthentication.cpp:59
KLocale * locale()
KSharedConfigPtr config()
QString randomString(int length)
KGuiItem cont()
const KShortcut & end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.