\section{KIO::Auth\-Info Class Reference}
\label{classKIO_1_1AuthInfo}\index{KIO::AuthInfo@{KIO::AuthInfo}}
This class is intended to make it easier to prompt for, cache and retrieve authorization information. A two way messaging class for passing authentication information.  


{\tt \#include $<$authinfo.h$>$}

Collaboration diagram for KIO::Auth\-Info:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=92pt]{classKIO_1_1AuthInfo__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Auth\-Info} ()
\item 
{\bf Auth\-Info} (const {\bf Auth\-Info} \&info)
\item 
{\bf Auth\-Info} \& {\bf operator=} (const {\bf Auth\-Info} \&info)
\item 
bool {\bf is\-Modified} () const 
\item 
void {\bf set\-Modified} (bool flag)
\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
{\bf KURL} {\bf url}
\item 
{\bf QString} {\bf username}
\item 
{\bf QString} {\bf password}
\item 
{\bf QString} {\bf prompt}
\item 
{\bf QString} {\bf caption}
\item 
{\bf QString} {\bf comment}
\item 
{\bf QString} {\bf comment\-Label}
\item 
{\bf QString} {\bf realm\-Value}
\item 
{\bf QString} {\bf digest\-Info}
\item 
bool {\bf verify\-Path}
\item 
bool {\bf read\-Only}
\item 
bool {\bf keep\-Password}
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
bool {\bf modified}\label{classKIO_1_1AuthInfo_p0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
KIO\_\-EXPORT friend {\bf QData\-Stream} \& {\bf operator$<$$<$} ({\bf QData\-Stream} \&s, const {\bf Auth\-Info} \&a)\label{classKIO_1_1AuthInfo_n0}

\item 
KIO\_\-EXPORT friend {\bf QData\-Stream} \& {\bf operator$>$$>$} ({\bf QData\-Stream} \&s, {\bf Auth\-Info} \&a)\label{classKIO_1_1AuthInfo_n1}

\end{CompactItemize}


\subsection{Detailed Description}
This class is intended to make it easier to prompt for, cache and retrieve authorization information. A two way messaging class for passing authentication 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 comment\-Label fields.

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

\begin{Desc}
\item[Author:]Dawit Alemayehu $<${\tt adawit@kde.org}$>$ \end{Desc}




Definition at line 51 of file authinfo.h.

\subsection{Constructor \& Destructor Documentation}
\index{KIO::AuthInfo@{KIO::Auth\-Info}!AuthInfo@{AuthInfo}}
\index{AuthInfo@{AuthInfo}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Auth\-Info::Auth\-Info ()}\label{classKIO_1_1AuthInfo_a0}


Default constructor. 



Definition at line 44 of file authinfo.cpp.

References keep\-Password, read\-Only, and verify\-Path.\index{KIO::AuthInfo@{KIO::Auth\-Info}!AuthInfo@{AuthInfo}}
\index{AuthInfo@{AuthInfo}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Auth\-Info::Auth\-Info (const {\bf Auth\-Info} \& {\em info})}\label{classKIO_1_1AuthInfo_a1}


Copy constructor. 



Definition at line 52 of file authinfo.cpp.

\subsection{Member Function Documentation}
\index{KIO::AuthInfo@{KIO::Auth\-Info}!operator=@{operator=}}
\index{operator=@{operator=}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Auth\-Info} \& Auth\-Info::operator= (const {\bf Auth\-Info} \& {\em info})}\label{classKIO_1_1AuthInfo_a2}


Overloaded equal to operator. 



Definition at line 57 of file authinfo.cpp.

References caption, comment, comment\-Label, digest\-Info, keep\-Password, password, prompt, read\-Only, realm\-Value, KURL::url(), url, username, and verify\-Path.\index{KIO::AuthInfo@{KIO::Auth\-Info}!isModified@{isModified}}
\index{isModified@{isModified}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::Auth\-Info::is\-Modified () const\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1AuthInfo_a3}


Use this method to check if the object was modified. 

\begin{Desc}
\item[Returns:]true if the object has been modified \end{Desc}


Definition at line 76 of file authinfo.h.

Referenced by KIO::Slave\-Base::check\-Cached\-Authentication(), and KIO::Slave\-Base::open\-Pass\-Dlg().\index{KIO::AuthInfo@{KIO::Auth\-Info}!setModified@{setModified}}
\index{setModified@{setModified}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Auth\-Info::set\-Modified (bool {\em flag})\hspace{0.3cm}{\tt  [inline]}}\label{classKIO_1_1AuthInfo_a4}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em flag}]true to mark the object as modified, false to clear \end{description}
\end{Desc}


Definition at line 82 of file authinfo.h.

\subsection{Member Data Documentation}
\index{KIO::AuthInfo@{KIO::Auth\-Info}!url@{url}}
\index{url@{url}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KURL} {\bf KIO::Auth\-Info::url}}\label{classKIO_1_1AuthInfo_o0}


The URL for which authentication is to be stored. 

This field is required when attempting to cache authorization and retrieve it. However, it is not needed when prompting the user for authorization info.

This setting is {\em required\/} except when prompting the user for password. 

Definition at line 94 of file authinfo.h.

Referenced by operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!username@{username}}
\index{username@{username}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::username}}\label{classKIO_1_1AuthInfo_o1}


This is {\em required\/} for caching. 



Definition at line 99 of file authinfo.h.

Referenced by KIO::Slave\-Interface::open\-Pass\-Dlg(), Observer::open\-Pass\-Dlg(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!password@{password}}
\index{password@{password}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::password}}\label{classKIO_1_1AuthInfo_o2}


This is {\em required\/} for caching. 



Definition at line 104 of file authinfo.h.

Referenced by Observer::open\-Pass\-Dlg(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!prompt@{prompt}}
\index{prompt@{prompt}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::prompt}}\label{classKIO_1_1AuthInfo_o3}


Information to be displayed when prompting the user for authentication information. 

\begin{Desc}
\item[Note:]If this field is not set, the authentication dialog simply displays the preset default prompt.\end{Desc}
This setting is {\em optional\/} and empty by default. 

Definition at line 115 of file authinfo.h.

Referenced by KIO::Slave\-Interface::open\-Pass\-Dlg(), Observer::open\-Pass\-Dlg(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!caption@{caption}}
\index{caption@{caption}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::caption}}\label{classKIO_1_1AuthInfo_o4}


The text to displayed in the title bar of the password prompting dialog. 

\begin{Desc}
\item[Note:]If this field is not set, the authentication dialog simply displays the preset default caption.\end{Desc}
This setting is {\em optional\/} and empty by default. 

Definition at line 126 of file authinfo.h.

Referenced by KIO::Slave\-Interface::open\-Pass\-Dlg(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!comment@{comment}}
\index{comment@{comment}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::comment}}\label{classKIO_1_1AuthInfo_o5}


Additional comment to be displayed when prompting the user for authentication information. 

This field allows you to display a short (no more than 80 characters) extra description in the password prompt dialog. For example, this field along with the comment\-Label can be used to describe the server that requested the authentication:



\footnotesize\begin{verbatim}  Server:   Squid Proxy @ foo.com
\end{verbatim}
\normalsize


where \char`\"{}Server:\char`\"{} is the comment\-Label and the rest is the actual comment. Note that it is always better to use the {\tt comment\-Label} field as it will be placed properly in the dialog rather than to include it within the actual comment.

This setting is {\em optional\/} and empty by default. 

Definition at line 150 of file authinfo.h.

Referenced by KIO::Slave\-Interface::open\-Pass\-Dlg(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!commentLabel@{commentLabel}}
\index{commentLabel@{commentLabel}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::comment\-Label}}\label{classKIO_1_1AuthInfo_o6}


Descriptive label to be displayed in front of the comment when prompting the user for password. 

This setting is {\em optional\/} and only applicable when the comment field is also set. 

Definition at line 159 of file authinfo.h.

Referenced by KIO::Slave\-Interface::open\-Pass\-Dlg(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!realmValue@{realmValue}}
\index{realmValue@{realmValue}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::realm\-Value}}\label{classKIO_1_1AuthInfo_o7}


A unique identifier that allows caching of multiple passwords for different resources in the same server. 

Mostly this setting is applicable to the HTTP protocol whose authentication scheme explicitly defines the use of such a unique key. However, any protocol that can generate or supply a unique id can effectively use it to distinguish passwords.

(If you are instead interested in caching the authentication info for multiple users to the same server, refer to multiple\-User\-Caching below)

This setting is {\em optional\/} and not set by default. 

Definition at line 177 of file authinfo.h.

Referenced by operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!digestInfo@{digestInfo}}
\index{digestInfo@{digestInfo}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} {\bf KIO::Auth\-Info::digest\-Info}}\label{classKIO_1_1AuthInfo_o8}


Field to store any extra authentication information for protocols that need it (ex: http). 

This setting is {\em optional\/} and mostly applicable for HTTP protocol. However, any protocol can make use of it to store extra info. 

Definition at line 187 of file authinfo.h.

Referenced by operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!verifyPath@{verifyPath}}
\index{verifyPath@{verifyPath}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf KIO::Auth\-Info::verify\-Path}}\label{classKIO_1_1AuthInfo_o9}


Flag that, if set, indicates whether a path match should be performed when requesting for cached authorization. 

A path is deemed to be a match if it is equal to or is a subset of the cached path. For example, if stored path is \char`\"{}/foo/bar\char`\"{} and the request's path set to \char`\"{}/foo/bar/acme\char`\"{}, then it is a match whereas it would not if the request's path was set to \char`\"{}/foo\char`\"{}.

This setting is {\em optional\/} and false by default. 

Definition at line 200 of file authinfo.h.

Referenced by Auth\-Info(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!readOnly@{readOnly}}
\index{readOnly@{readOnly}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf KIO::Auth\-Info::read\-Only}}\label{classKIO_1_1AuthInfo_o10}


Flag which if set forces the username field to be read-only. 

This setting is {\em optional\/} and false by default. 

Definition at line 207 of file authinfo.h.

Referenced by Auth\-Info(), KIO::Slave\-Interface::open\-Pass\-Dlg(), Observer::open\-Pass\-Dlg(), and operator=().\index{KIO::AuthInfo@{KIO::Auth\-Info}!keepPassword@{keepPassword}}
\index{keepPassword@{keepPassword}!KIO::AuthInfo@{KIO::Auth\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool {\bf KIO::Auth\-Info::keep\-Password}}\label{classKIO_1_1AuthInfo_o11}


Flag to indicate the persistence of the given password. 

This is a two-way flag, when set before calling open\-Pass\-Dlg it makes the \char`\"{}keep Password\char`\"{} check box visible to the user. In return the flag will indicate the state of the check box. By default if the flag is checked the password will be cached for the entire life of the current {\bf KDE} session otherwise the cached password is deleted right after the application using it has been closed. 

Definition at line 220 of file authinfo.h.

Referenced by Auth\-Info(), and operator=().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
authinfo.h\item 
authinfo.cpp\end{CompactItemize}
