• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIOSlave

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KAbstractHttpAuthentication Class Referenceabstract

#include <httpauthentication.h>

Inheritance diagram for KAbstractHttpAuthentication:
Inheritance graph
[legend]

Public Member Functions

 KAbstractHttpAuthentication (KConfigGroup *config=0)
 
virtual ~KAbstractHttpAuthentication ()
 
virtual void fillKioAuthInfo (KIO::AuthInfo *ai) const =0
 
bool forceDisconnect () const
 
bool forceKeepAlive () const
 
virtual void generateResponse (const QString &user, const QString &password)=0
 
QByteArray headerFragment () const
 
bool isError () const
 
bool needCredentials () const
 
QString realm () const
 
void reset ()
 
virtual QByteArray scheme () const =0
 
void setCachePasswordEnabled (bool enable)
 
virtual void setChallenge (const QByteArray &c, const KUrl &resource, const QByteArray &httpMethod)
 
virtual bool supportsPathMatching () const
 
bool wasFinalStage () const
 

Static Public Member Functions

static QByteArray bestOffer (const QList< QByteArray > &offers)
 
static
KAbstractHttpAuthentication * 
newAuth (const QByteArray &offer, KConfigGroup *config=0)
 
static QList< QByteArray > splitOffers (const QList< QByteArray > &offers)
 

Protected Member Functions

virtual QByteArray authDataToCache () const
 
void authInfoBoilerplate (KIO::AuthInfo *a) const
 
void generateResponseCommon (const QString &user, const QString &password)
 

Protected Attributes

QList< QByteArray > m_challenge
 
QByteArray m_challengeText
 
KConfigGroup * m_config
 
bool m_finalAuthStage
 
bool m_forceDisconnect
 
bool m_forceKeepAlive
 
QByteArray m_headerFragment
 
QByteArray m_httpMethod
 
bool m_isError
 
bool m_keepPassword
 
bool m_needCredentials
 
QString m_password
 
KUrl m_resource
 
QByteArray m_scheme
 
QString m_username
 

Detailed Description

Definition at line 37 of file httpauthentication.h.

Constructor & Destructor Documentation

KAbstractHttpAuthentication::KAbstractHttpAuthentication ( KConfigGroup *  config = 0)

Definition at line 217 of file httpauthentication.cpp.

KAbstractHttpAuthentication::~KAbstractHttpAuthentication ( )
virtual

Definition at line 223 of file httpauthentication.cpp.

Member Function Documentation

virtual QByteArray KAbstractHttpAuthentication::authDataToCache ( ) const
inlineprotectedvirtual

Returns any authentication data that should be cached for future use.

NOTE: Do not reimplement this function for connection based authentication schemes such as NTLM.

Reimplemented in KHttpDigestAuthentication, and KHttpBasicAuthentication.

Definition at line 159 of file httpauthentication.h.

void KAbstractHttpAuthentication::authInfoBoilerplate ( KIO::AuthInfo *  a) const
protected

Definition at line 345 of file httpauthentication.cpp.

QByteArray KAbstractHttpAuthentication::bestOffer ( const QList< QByteArray > &  offers)
static

Choose the best authentication mechanism from the offered ones.

This will return the most secure mechanism from the list of mechanisms retuned by the server.

Definition at line 227 of file httpauthentication.cpp.

virtual void KAbstractHttpAuthentication::fillKioAuthInfo ( KIO::AuthInfo *  ai) const
pure virtual

KIO compatible data to find cached credentials.

Note that username and/or password as well as UI text will NOT be filled in.

Implemented in KHttpNtlmAuthentication, KHttpDigestAuthentication, and KHttpBasicAuthentication.

bool KAbstractHttpAuthentication::forceDisconnect ( ) const
inline

force disconnection because the authentication method requires it

Definition at line 125 of file httpauthentication.h.

bool KAbstractHttpAuthentication::forceKeepAlive ( ) const
inline

force keep-alive connection because the authentication method requires it

Definition at line 121 of file httpauthentication.h.

virtual void KAbstractHttpAuthentication::generateResponse ( const QString &  user,
const QString &  password 
)
pure virtual

what to do in response to challenge

Implemented in KHttpNtlmAuthentication, KHttpDigestAuthentication, and KHttpBasicAuthentication.

void KAbstractHttpAuthentication::generateResponseCommon ( const QString &  user,
const QString &  password 
)
protected

Definition at line 357 of file httpauthentication.cpp.

QByteArray KAbstractHttpAuthentication::headerFragment ( ) const
inline

insert this into the next request header after "Authorization: " or "Proxy-Authorization: "

Definition at line 131 of file httpauthentication.h.

bool KAbstractHttpAuthentication::isError ( ) const
inline

Definition at line 117 of file httpauthentication.h.

bool KAbstractHttpAuthentication::needCredentials ( ) const
inline

return value updated by setChallenge()

if this is false user and password passed to generateResponse will be ignored and may be empty.

Definition at line 85 of file httpauthentication.h.

KAbstractHttpAuthentication * KAbstractHttpAuthentication::newAuth ( const QByteArray &  offer,
KConfigGroup *  config = 0 
)
static

Returns authentication object instance appropriate for offer.

Parameters
offerthe header from which an authentication object is created.
configthe config object to read stored authentication information.

Definition at line 266 of file httpauthentication.cpp.

QString KAbstractHttpAuthentication::realm ( ) const

Returns the realm sent by the server.

This is mainly for GUI shown to the user. This is the identification of the protected area on the server (e.g. "Konquis home directory" or "KDE files").

Definition at line 334 of file httpauthentication.cpp.

void KAbstractHttpAuthentication::reset ( )

reset to state after default construction.

Definition at line 305 of file httpauthentication.cpp.

virtual QByteArray KAbstractHttpAuthentication::scheme ( ) const
pure virtual

the authentication scheme: "Negotiate", "Digest", "Basic", "NTLM"

Implemented in KHttpNtlmAuthentication, KHttpDigestAuthentication, and KHttpBasicAuthentication.

void KAbstractHttpAuthentication::setCachePasswordEnabled ( bool  enable)
inline

Sets the cache password flag to enable.

Definition at line 144 of file httpauthentication.h.

void KAbstractHttpAuthentication::setChallenge ( const QByteArray &  c,
const KUrl &  resource,
const QByteArray &  httpMethod 
)
virtual

initiate authentication with challenge string (from HTTP header)

Reimplemented in KHttpNtlmAuthentication, and KHttpDigestAuthentication.

Definition at line 322 of file httpauthentication.cpp.

QList< QByteArray > KAbstractHttpAuthentication::splitOffers ( const QList< QByteArray > &  offers)
static

Split all headers containing multiple authentication offers.

Parameters
offersthe offers from multiple HTTP authentication header lines.
Returns
a list where each entry contains only a single offer

Definition at line 284 of file httpauthentication.cpp.

virtual bool KAbstractHttpAuthentication::supportsPathMatching ( ) const
inlinevirtual

Returns true if the authentication scheme supports path matching to identify resources that belong to the same protection space (realm).

See RFC 2617.

Reimplemented in KHttpDigestAuthentication, and KHttpBasicAuthentication.

Definition at line 111 of file httpauthentication.h.

bool KAbstractHttpAuthentication::wasFinalStage ( ) const
inline

returns true when the final stage of authentication is reached.

Unless the authentication scheme requires multiple stages like NTLM this function will always return true.

Definition at line 104 of file httpauthentication.h.

Member Data Documentation

QList<QByteArray> KAbstractHttpAuthentication::m_challenge
protected

Definition at line 165 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_challengeText
protected

Definition at line 164 of file httpauthentication.h.

KConfigGroup* KAbstractHttpAuthentication::m_config
protected

Definition at line 162 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_finalAuthStage
protected

Definition at line 173 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_forceDisconnect
protected

Definition at line 172 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_forceKeepAlive
protected

Definition at line 171 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_headerFragment
protected

Definition at line 175 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_httpMethod
protected

Definition at line 167 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_isError
protected

Definition at line 169 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_keepPassword
protected

Definition at line 174 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_needCredentials
protected

Definition at line 170 of file httpauthentication.h.

QString KAbstractHttpAuthentication::m_password
protected

Definition at line 178 of file httpauthentication.h.

KUrl KAbstractHttpAuthentication::m_resource
protected

Definition at line 166 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_scheme
protected

this is parsed from the header and not necessarily == scheme().

Definition at line 163 of file httpauthentication.h.

QString KAbstractHttpAuthentication::m_username
protected

Definition at line 177 of file httpauthentication.h.


The documentation for this class was generated from the following files:
  • httpauthentication.h
  • httpauthentication.cpp
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

KDE's Doxygen guidelines are available online.

KIOSlave

Skip menu "KIOSlave"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal