diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2020-09-07 18:15:14 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2020-09-11 13:37:48 +0200 |
commit | e0918af700acefd6e80562c051e42d0b64097e1f (patch) | |
tree | 56432d0241af4bbc28db2e410f36b40a7ada6283 /tests | |
parent | e6b8eb502eb39f27fe3aa7a675cb3ca3ad220672 (diff) |
QAuthenticator: condition using GSSAPI on credentials availability
AFAICT with GSSAPI the normal workflow is to run kinit or similar and
authenticate before running programs relying on it. Therefore
we can try to get the credentials before we choose whether or not
to use Negotiate.
Pick-to: 5.15
Task-number: QTBUG-85123
Change-Id: If0478fdd45389b2939ad87c2f582776fe56959bb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp index 94a998a6a6..7e56921606 100644 --- a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp +++ b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp @@ -83,7 +83,7 @@ void tst_QAuthenticator::basicAuth() QList<QPair<QByteArray, QByteArray> > headers; headers << qMakePair(QByteArray("WWW-Authenticate"), "Basic " + data.toUtf8()); - priv->parseHttpResponse(headers, /*isProxy = */ false); + priv->parseHttpResponse(headers, /*isProxy = */ false, {}); QCOMPARE(auth.realm(), realm); QCOMPARE(auth.option("realm").toString(), realm); @@ -131,7 +131,7 @@ void tst_QAuthenticator::ntlmAuth() // Current implementation uses flags: // NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_REQUEST_TARGET headers << qMakePair(QByteArrayLiteral("WWW-Authenticate"), QByteArrayLiteral("NTLM")); - priv->parseHttpResponse(headers, /*isProxy = */ false); + priv->parseHttpResponse(headers, /*isProxy = */ false, {}); if (sso) QVERIFY(priv->calculateResponse("GET", "/", "").startsWith("NTLM ")); else @@ -140,7 +140,7 @@ void tst_QAuthenticator::ntlmAuth() // NTLM phase 2: challenge headers.clear(); headers << qMakePair(QByteArray("WWW-Authenticate"), "NTLM " + data.toUtf8()); - priv->parseHttpResponse(headers, /*isProxy = */ false); + priv->parseHttpResponse(headers, /*isProxy = */ false, {}); QEXPECT_FAIL("with-realm", "NTLM authentication code doesn't extract the realm", Continue); QEXPECT_FAIL("with-realm-sso", "NTLM authentication code doesn't extract the realm", Continue); |