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

KIOSlave

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
KAbstractHttpAuthentication Class Reference

#include <httpauthentication.h>

Inheritance diagram for KAbstractHttpAuthentication:
Inheritance graph
[legend]

List of all members.

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

Constructor & Destructor Documentation

KAbstractHttpAuthentication::KAbstractHttpAuthentication ( KConfigGroup *  config = 0)

Definition at line 219 of file httpauthentication.cpp.

KAbstractHttpAuthentication::~KAbstractHttpAuthentication ( ) [virtual]

Definition at line 225 of file httpauthentication.cpp.


Member Function Documentation

virtual QByteArray KAbstractHttpAuthentication::authDataToCache ( ) const [inline, protected, virtual]

Reimplemented in KHttpDigestAuthentication, and KHttpBasicAuthentication.

Definition at line 153 of file httpauthentication.h.

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

Definition at line 348 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 229 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 360 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 268 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 337 of file httpauthentication.cpp.

void KAbstractHttpAuthentication::reset ( )

reset to state after default construction.

Definition at line 307 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 325 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 286 of file httpauthentication.cpp.

virtual bool KAbstractHttpAuthentication::supportsPathMatching ( ) const [inline, virtual]

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 159 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_challengeText [protected]

Definition at line 158 of file httpauthentication.h.

KConfigGroup* KAbstractHttpAuthentication::m_config [protected]

Definition at line 156 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_finalAuthStage [protected]

Definition at line 167 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_forceDisconnect [protected]

Definition at line 166 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_forceKeepAlive [protected]

Definition at line 165 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_headerFragment [protected]

Definition at line 169 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_httpMethod [protected]

Definition at line 161 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_isError [protected]

Definition at line 163 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_keepPassword [protected]

Definition at line 168 of file httpauthentication.h.

bool KAbstractHttpAuthentication::m_needCredentials [protected]

Definition at line 164 of file httpauthentication.h.

QString KAbstractHttpAuthentication::m_password [protected]

Definition at line 172 of file httpauthentication.h.

KUrl KAbstractHttpAuthentication::m_resource [protected]

Definition at line 160 of file httpauthentication.h.

QByteArray KAbstractHttpAuthentication::m_scheme [protected]

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

Definition at line 157 of file httpauthentication.h.

QString KAbstractHttpAuthentication::m_username [protected]

Definition at line 171 of file httpauthentication.h.


The documentation for this class was generated from the following files:
  • httpauthentication.h
  • httpauthentication.cpp

KIOSlave

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

kdelibs

Skip menu "kdelibs"
  • 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal