KIOSlave
httpauthentication.cpp
Go to the documentation of this file.
79 static 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";
266 KAbstractHttpAuthentication *KAbstractHttpAuthentication::newAuth(const QByteArray &offer, KConfigGroup* config)
357 void 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);
832 void KHttpNegotiateAuthentication::generateResponse(const QString &user, const QString &password)
static KAbstractHttpAuthentication * newAuth(const QByteArray &offer, KConfigGroup *config=0)
Returns authentication object instance appropriate for offer.
Definition: httpauthentication.cpp:266
virtual ~KAbstractHttpAuthentication()
Definition: httpauthentication.cpp:223
virtual void generateResponse(const QString &user, const QString &password)
what to do in response to challenge
Definition: httpauthentication.cpp:519
QString directory(const DirectoryOptions &options=IgnoreTrailingSlash) const
KUrl url
virtual QByteArray scheme() const
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
Definition: httpauthentication.cpp:400
virtual QByteArray scheme() const
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
Definition: httpauthentication.cpp:697
KAbstractHttpAuthentication(KConfigGroup *config=0)
Definition: httpauthentication.cpp:217
bool keepPassword
QString digestInfo
virtual void fillKioAuthInfo(KIO::AuthInfo *ai) const
KIO compatible data to find cached credentials.
Definition: httpauthentication.cpp:427
QByteArray m_httpMethod
Definition: httpauthentication.h:167
void generateResponseCommon(const QString &user, const QString &password)
Definition: httpauthentication.cpp:357
static bool getAuth(QByteArray &auth, const QByteArray &challenge, const QString &user, const QString &password, const QString &domain=QString(), const QString &workstation=QString(), AuthFlags authflags=Add_LM)
static bool containsScheme(const char input[], int start, int end)
Definition: httpauthentication.cpp:59
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual QByteArray scheme() const =0
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
Definition: httpauthentication.h:182
static QList< QByteArray > splitOffers(const QList< QByteArray > &offers)
Split all headers containing multiple authentication offers.
Definition: httpauthentication.cpp:284
static bool getNegotiate(QByteArray &negotiate, const QString &domain=QString(), const QString &workstation=QString(), quint32 flags=Negotiate_Unicode|Request_Target|Negotiate_NTLM)
virtual void generateResponse(const QString &user, const QString &password)
what to do in response to challenge
Definition: httpauthentication.cpp:732
static QByteArray valueForKey(const QList< QByteArray > &ba, const QByteArray &key)
Definition: httpauthentication.cpp:207
QString realmValue
bool m_forceDisconnect
Definition: httpauthentication.h:172
bool verifyPath
static QByteArray calculateResponse(const DigestAuthInfo &info, const KUrl &resource)
Definition: httpauthentication.cpp:450
virtual QByteArray scheme() const
the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"
Definition: httpauthentication.cpp:376
QString protocol() const
bool m_forceKeepAlive
Definition: httpauthentication.h:171
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 void setChallenge(const QByteArray &c, const KUrl &resource, const QByteArray &httpMethod)
initiate authentication with challenge string (from HTTP header)
Definition: httpauthentication.cpp:406
static QByteArray bestOffer(const QList< QByteArray > &offers)
Choose the best authentication mechanism from the offered ones.
Definition: httpauthentication.cpp:227
void update(const char *in, int len=-1)
void authInfoBoilerplate(KIO::AuthInfo *a) const
Definition: httpauthentication.cpp:345
virtual void generateResponse(const QString &user, const QString &password)
what to do in response to challenge
Definition: httpauthentication.cpp:387
QByteArray hexDigest()
QByteArray m_headerFragment
Definition: httpauthentication.h:175
bool m_finalAuthStage
Definition: httpauthentication.h:173
virtual void setChallenge(const QByteArray &c, const KUrl &resource, const QByteArray &httpMethod)
initiate authentication with challenge string (from HTTP header)
Definition: httpauthentication.cpp:322
virtual void fillKioAuthInfo(KIO::AuthInfo *ai) const
KIO compatible data to find cached credentials.
Definition: httpauthentication.cpp:722
QByteArray m_scheme
this is parsed from the header and not necessarily == scheme().
Definition: httpauthentication.h:163
KLocale * locale()
virtual QByteArray authDataToCache() const
Returns any authentication data that should be cached for future use.
Definition: httpauthentication.h:159
bool m_needCredentials
Definition: httpauthentication.h:170
QString encodedPathAndQuery(AdjustPathOption trailing=LeaveTrailingSlash, const EncodedPathAndQueryOptions &options=PermitEmptyPath) const
QString password
virtual void fillKioAuthInfo(KIO::AuthInfo *ai) const
KIO compatible data to find cached credentials.
Definition: httpauthentication.cpp:382
virtual bool supportsPathMatching() const
Returns true if the authentication scheme supports path matching to identify resources that belong to...
Definition: httpauthentication.h:111
QString username
QList< QByteArray > m_challenge
Definition: httpauthentication.h:165
void reset()
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
KGuiItem cont()
static QList< QByteArray > parseChallenge(QByteArray &ba, QByteArray *scheme, QByteArray *nextAuth=0)
Definition: httpauthentication.cpp:79
const KShortcut & end()
QString randomString(int length)
T readEntry(const QString &key, const T &aDefault) const
Definition: httpauthentication.h:222
QByteArray m_challengeText
Definition: httpauthentication.h:164
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.