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.
SPECIAL NOTE: 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 serialized.
A two way messaging class for passing authentication information.
- Dawit Alemayehu adawi[email protected][email protected][email protected]e.org
Definition at line 61 of file authinfo.h.
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 commentLabel can be used to describe the server that requested the authentication:
Server: Squid Proxy @ foo.com
where "Server:" is the commentLabel and the rest is the actual comment. Note that it is always better to use the
commentLabel field as it will be placed properly in the dialog rather than to include it within the actual comment.
This setting is optional and empty by default.
Definition at line 170 of file authinfo.h.
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.
This setting is optional and not set by default.
Definition at line 193 of file authinfo.h.
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 required except when prompting the user for password.
Definition at line 114 of file authinfo.h.
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".
This setting is optional and false by default.
Definition at line 216 of file authinfo.h.