KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

AuthInfo Class Reference

from PyKDE4.kio import *

Namespace: KIO

Detailed Description

This class is intended to make it easier to prompt for, cache and retrieve authorization information.

When using this class to cache, retrieve or prompt authentication information, you only need to set the necessary attributes. For example, to check whether a password is already cached, the only required information is the URL of the resource and optionally whether or not a path match should be performed. Similarly, to prompt for password you only need to optionally set the prompt, username (if already supplied), comment and commentLabel fields.

<em>SPECIAL NOTE:</em> If you extend this class to add additional parameters do not forget to overload the stream insertion and extraction operators ("<<" and ">>") so that the added data can be correctly serialzed.

A two way messaging class for passing authentication information.

Author:
Dawit Alemayehu <adawit@kde.org>


Enumerations

FieldFlags { ExtraFieldNoFlags, ExtraFieldReadOnly, ExtraFieldMandatory }

Attributes

QString caption
QString comment
QString commentLabel
QString digestInfo
bool keepPassword
QString password
QString prompt
bool readOnly
QString realmValue
KUrl url
QString username
bool verifyPath

Methods

 __init__ (self)
 __init__ (self, KIO.AuthInfo info)
QVariant getExtraField (self, QString fieldName)
KIO.AuthInfo.FieldFlags getExtraFieldFlags (self, QString fieldName)
bool isModified (self)
 setExtraField (self, QString fieldName, QVariant value)
 setExtraFieldFlags (self, QString fieldName, KIO.AuthInfo.FieldFlags flags)
 setModified (self, bool flag)

Static Methods

 registerMetaTypes ()

Method Documentation

__init__ (   self )

Default constructor.

__init__ (  self,
KIO.AuthInfo  info
)

Copy constructor.

QVariant getExtraField (  self,
QString  fieldName
)

Get Extra Field Value Check QVariant.isValid() to find out if the field exists.

Since:
4.1

KIO.AuthInfo.FieldFlags getExtraFieldFlags (  self,
QString  fieldName
)

Get Extra Field Flags

Since:
4.1

bool isModified (   self )

Use this method to check if the object was modified.

Returns:
true if the object has been modified

setExtraField (  self,
QString  fieldName,
QVariant  value
)

Set Extra Field Value. Currently supported extra-fields: "domain" (QString), "anonymous" (bool) Setting it to an invalid QVariant() will disable the field. Extra Fields are disabled by default.

Since:
4.1

setExtraFieldFlags (  self,
QString  fieldName,
KIO.AuthInfo.FieldFlags  flags
)

Set Extra Field Flags

Since:
4.1

setModified (  self,
bool  flag
)

Use this method to indicate that this object has been modified.

Parameters:
flag  true to mark the object as modified, false to clear


Static Method Documentation

registerMetaTypes (   )

Register the meta-types for AuthInfo. This is called from AuthInfo's constructor but needed by daemons on the DBus such as kpasswdserver.

Since:
4.3


Attribute Documentation

QString caption

QString comment

QString commentLabel

QString digestInfo

bool keepPassword

QString password

QString prompt

bool readOnly

QString realmValue

KUrl url

QString username

bool verifyPath


Enumeration Documentation

FieldFlags

Flags for extra fields

Since:
4.1

Enumerator:
ExtraFieldNoFlags = 0
ExtraFieldReadOnly = 1<<1
ExtraFieldMandatory = 1<<2

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal