.TH "KIO::AuthInfo" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
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.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <authinfo.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBAuthInfo\fP ()"
.br
.RI "\fIDefault constructor. \fP"
.ti -1c
.RI "\fBAuthInfo\fP (const  \fBAuthInfo\fP &info)"
.br
.RI "\fICopy constructor. \fP"
.ti -1c
.RI "\fBAuthInfo\fP & \fBoperator=\fP (const  \fBAuthInfo\fP &info)"
.br
.RI "\fIOverloaded equal to operator. \fP"
.ti -1c
.RI "bool \fBisModified\fP () const "
.br
.RI "\fIUse this method to check if the object was modified. \fP"
.ti -1c
.RI "void \fBsetModified\fP (bool flag)"
.br
.RI "\fIUse this method to indicate that this object has been modified. \fP"
.in -1c
.SS "Public Attributes"

.in +1c
.ti -1c
.RI "\fBKURL\fP \fBurl\fP"
.br
.RI "\fIThe URL for which authentication is to be stored. \fP"
.ti -1c
.RI "\fBQString\fP \fBusername\fP"
.br
.RI "\fIThis setting is \fIrequired\fP for caching. \fP"
.ti -1c
.RI "\fBQString\fP \fBpassword\fP"
.br
.RI "\fIThis setting is \fIrequired\fP for caching. \fP"
.ti -1c
.RI "\fBQString\fP \fBprompt\fP"
.br
.RI "\fIInformation to be displayed when prompting the user for authentication information. \fP"
.ti -1c
.RI "\fBQString\fP \fBcaption\fP"
.br
.RI "\fIThe text to displayed in the title bar of the password prompting dialog. \fP"
.ti -1c
.RI "\fBQString\fP \fBcomment\fP"
.br
.RI "\fIAdditional comment to be displayed when prompting the user for authentication information. \fP"
.ti -1c
.RI "\fBQString\fP \fBcommentLabel\fP"
.br
.RI "\fIDescriptive label to be displayed in front of the comment when prompting the user for password. \fP"
.ti -1c
.RI "\fBQString\fP \fBrealmValue\fP"
.br
.RI "\fIA unique identifier that allows caching of multiple passwords for different resources in the same server. \fP"
.ti -1c
.RI "\fBQString\fP \fBdigestInfo\fP"
.br
.RI "\fIField to store any extra authentication information for protocols that need it (ex: http). \fP"
.ti -1c
.RI "bool \fBverifyPath\fP"
.br
.RI "\fIFlag that, if set, indicates whether a path match should be performed when requesting for cached authorization. \fP"
.ti -1c
.RI "bool \fBreadOnly\fP"
.br
.RI "\fIFlag which if set forces the username field to be read-only. \fP"
.ti -1c
.RI "bool \fBkeepPassword\fP"
.br
.RI "\fIFlag to indicate the persistence of the given password. \fP"
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "bool \fBmodified\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "\fBQDataStream\fP & \fBoperator<<\fP (\fBQDataStream\fP &s, const  \fBAuthInfo\fP &a)"
.br
.ti -1c
.RI "\fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &s, \fBAuthInfo\fP &a)"
.br
.in -1c
.SH "Detailed Description"
.PP 
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 commentLabel fields.
.PP
SPECIAL NOTE: If you extend this class to add additional paramters do not forget to overload the stream insertion and extraction operators ('<<' and '>>') so that the added data can be correctly serialzed.
.PP
\fBAuthor:\fP
.RS 4
Dawit Alemayehu <adawit@kde.org> 
.RE
.PP

.PP
Definition at line 51 of file authinfo.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "AuthInfo::AuthInfo ()"
.PP
Default constructor. Definition at line 43 of file authinfo.cpp.
.PP
References keepPassword, readOnly, and verifyPath.
.SS "AuthInfo::AuthInfo (const \fBAuthInfo\fP & info)"
.PP
Copy constructor. Definition at line 51 of file authinfo.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBAuthInfo\fP & AuthInfo::operator= (const \fBAuthInfo\fP & info)"
.PP
Overloaded equal to operator. Definition at line 56 of file authinfo.cpp.
.PP
References caption, comment, commentLabel, digestInfo, keepPassword, modified, password, prompt, readOnly, realmValue, url, username, and verifyPath.
.SS "bool KIO::AuthInfo::isModified () const\fC [inline]\fP"
.PP
Use this method to check if the object was modified. Definition at line 75 of file authinfo.h.
.PP
Referenced by KIO::SlaveBase::checkCachedAuthentication(), and KIO::SlaveBase::openPassDlg().
.SS "void KIO::AuthInfo::setModified (bool flag)\fC [inline]\fP"
.PP
Use this method to indicate that this object has been modified. Definition at line 80 of file authinfo.h.
.SH "Member Data Documentation"
.PP 
.SS "\fBKURL\fP \fBKIO::AuthInfo::url\fP"
.PP
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.
.PP
This setting is \fIrequired\fP except when prompting the user for password. Definition at line 92 of file authinfo.h.
.PP
Referenced by KIO::SlaveBase::checkCachedAuthentication(), and operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::username\fP"
.PP
This setting is \fIrequired\fP for caching. Definition at line 97 of file authinfo.h.
.PP
Referenced by KIO::SlaveInterface::openPassDlg(), KIO::SlaveBase::openPassDlg(), Observer::openPassDlg(), and operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::password\fP"
.PP
This setting is \fIrequired\fP for caching. Definition at line 102 of file authinfo.h.
.PP
Referenced by Observer::openPassDlg(), and operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::prompt\fP"
.PP
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.
.PP
This setting is \fIoptional\fP and empty by default. Definition at line 113 of file authinfo.h.
.PP
Referenced by KIO::SlaveInterface::openPassDlg(), Observer::openPassDlg(), and operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::caption\fP"
.PP
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.
.PP
This setting is \fIoptional\fP and empty by default. Definition at line 124 of file authinfo.h.
.PP
Referenced by KIO::SlaveInterface::openPassDlg(), and operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::comment\fP"
.PP
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 \fBcommentLabel\fP can be used to describe the server that requested the authentication:
.PP
.PP
.nf

  Server:   Squid Proxy @ foo.com
  
.PP
.PP
where 'Server:' is the commentLabel and the rest is the actual comment. Note that it is always better to use the \fCcommentLabel\fP field as it will be placed properly in the dialog rather than to include it within the actual comment.
.PP
This setting is \fIoptional\fP and empty by default. Definition at line 148 of file authinfo.h.
.PP
Referenced by KIO::SlaveInterface::openPassDlg(), and operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::commentLabel\fP"
.PP
Descriptive label to be displayed in front of the comment when prompting the user for password. This setting is \fIoptional\fP and only applicable when the \fBcomment\fP field is also set. Definition at line 157 of file authinfo.h.
.PP
Referenced by KIO::SlaveInterface::openPassDlg(), and operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::realmValue\fP"
.PP
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.
.PP
(If you are instead interested in caching the authentication info for multiple users to the same server, refer to multipleUserCaching below)
.PP
This setting is \fIoptional\fP and not set by default. Definition at line 175 of file authinfo.h.
.PP
Referenced by operator=().
.SS "\fBQString\fP \fBKIO::AuthInfo::digestInfo\fP"
.PP
Field to store any extra authentication information for protocols that need it (ex: http). This setting is \fIoptional\fP 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.
.PP
Referenced by operator=().
.SS "bool \fBKIO::AuthInfo::verifyPath\fP"
.PP
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 '/foo/bar' and the request's path set to '/foo/bar/acme', then it is a match whereas it would not if the request's path was set to '/foo'.
.PP
This setting is \fIoptional\fP and false by default. Definition at line 198 of file authinfo.h.
.PP
Referenced by AuthInfo(), and operator=().
.SS "bool \fBKIO::AuthInfo::readOnly\fP"
.PP
Flag which if set forces the username field to be read-only. This setting is \fIoptional\fP and false by default. Definition at line 205 of file authinfo.h.
.PP
Referenced by AuthInfo(), KIO::SlaveInterface::openPassDlg(), Observer::openPassDlg(), and operator=().
.SS "bool \fBKIO::AuthInfo::keepPassword\fP"
.PP
Flag to indicate the persistence of the given password. This is a two-way flag, when set before calling openPassDlg it makes the 'keep Password' 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 \fBKDE\fP session otherwise the cached password is deleted right after the application using it has been closed. Definition at line 218 of file authinfo.h.
.PP
Referenced by AuthInfo(), and operator=().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
