\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=102pt]{classKIO_1_1AuthInfo__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Auth\-Info} ()
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
{\bf Auth\-Info} (const  {\bf Auth\-Info} \&info)
\begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 
{\bf Auth\-Info} \& {\bf operator=} (const  {\bf Auth\-Info} \&info)
\begin{CompactList}\small\item\em Overloaded equal to operator. \item\end{CompactList}\item 
bool {\bf is\-Modified} () const 
\begin{CompactList}\small\item\em Use this method to check if the object was modified. \item\end{CompactList}\item 
void {\bf set\-Modified} (bool flag)
\begin{CompactList}\small\item\em Use this method to indicate that this object has been modified. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
{\bf KURL} {\bf url}
\begin{CompactList}\small\item\em The URL for which authentication is to be stored. \item\end{CompactList}\item 
{\bf QString} {\bf username}
\begin{CompactList}\small\item\em This setting is {\em required\/} for caching. \item\end{CompactList}\item 
{\bf QString} {\bf password}
\begin{CompactList}\small\item\em This setting is {\em required\/} for caching. \item\end{CompactList}\item 
{\bf QString} {\bf prompt}
\begin{CompactList}\small\item\em Information to be displayed when prompting the user for authentication information. \item\end{CompactList}\item 
{\bf QString} {\bf caption}
\begin{CompactList}\small\item\em The text to displayed in the title bar of the password prompting dialog. \item\end{CompactList}\item 
{\bf QString} {\bf comment}
\begin{CompactList}\small\item\em Additional comment to be displayed when prompting the user for authentication information. \item\end{CompactList}\item 
{\bf QString} {\bf comment\-Label}
\begin{CompactList}\small\item\em Descriptive label to be displayed in front of the comment when prompting the user for password. \item\end{CompactList}\item 
{\bf QString} {\bf realm\-Value}
\begin{CompactList}\small\item\em A unique identifier that allows caching of multiple passwords for different resources in the same server. \item\end{CompactList}\item 
{\bf QString} {\bf digest\-Info}
\begin{CompactList}\small\item\em Field to store any extra authentication information for protocols that need it (ex: http). \item\end{CompactList}\item 
bool {\bf verify\-Path}
\begin{CompactList}\small\item\em Flag that, if set, indicates whether a path match should be performed when requesting for cached authorization. \item\end{CompactList}\item 
bool {\bf read\-Only}
\begin{CompactList}\small\item\em Flag which if set forces the username field to be read-only. \item\end{CompactList}\item 
bool {\bf keep\-Password}
\begin{CompactList}\small\item\em Flag to indicate the persistence of the given password. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
bool {\bf modified}\label{classKIO_1_1AuthInfo_p0}

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

\item 
{\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.

SPECIAL NOTE: If you extend this class to add additional paramters 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 43 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 51 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 56 of file authinfo.cpp.

References caption, comment, comment\-Label, digest\-Info, keep\-Password, modified, password, prompt, read\-Only, realm\-Value, 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. 



Definition at line 75 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. 



Definition at line 80 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 92 of file authinfo.h.

Referenced by KIO::Slave\-Base::check\-Cached\-Authentication(), and 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 setting is {\em required\/} for caching. 



Definition at line 97 of file authinfo.h.

Referenced by KIO::Slave\-Interface::open\-Pass\-Dlg(), KIO::Slave\-Base::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 setting is {\em required\/} for caching. 



Definition at line 102 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. 

NOTE:If this field is not set, the authentication dialog simply displays the preset default prompt.

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

Definition at line 113 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. 

NOTE:If this field is not set, the authentication dialog simply displays the preset default caption.

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

Definition at line 124 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 {\bf comment\-Label}{\rm (p.\,\pageref{classKIO_1_1AuthInfo_o6})} can be used to describe the server that requested the authentication:

\small\begin{alltt}
  Server:   Squid Proxy @ foo.com
  \end{alltt}\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 148 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 {\bf comment}{\rm (p.\,\pageref{classKIO_1_1AuthInfo_o5})} field is also set. 

Definition at line 157 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 175 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 185 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 198 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 205 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 218 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}
