|
tufao
0.8.1
An asynchronous web framework for C++ built on top of Qt
|
The SessionSettings class exposes details that sessions use to handle cookies. More...
Collaboration diagram for Tufao::SessionSettings:Public Member Functions | |
| QNetworkCookie | cookie (const QByteArray &value=QByteArray()) const |
Creates a cookie, using value as the cookie's value. | |
Static Public Member Functions | |
| static QNetworkCookie | cookie (const SessionSettings &settings, const QByteArray &value=QByteArray()) |
Creates a cookie, using value as the cookie's value and settings as cookie's settings. | |
Public Attributes | |
| int | timeout |
| Define the lifetime of cookies generated by this object (a timeout specified in minutes). More... | |
| bool | httpOnly |
| Whether cookies generated by this object should only be used in HTTP requests. More... | |
| QByteArray | name |
| The name to which cookies generated by this object are used. More... | |
| QByteArray | path |
| The set of paths to which cookies generated by this object are used. More... | |
| bool | secure |
| Whether cookies generated by this object should only be used through secure connections. More... | |
| QByteArray | domain |
| The hosts to which cookies generated by this object are used. More... | |
The SessionSettings class exposes details that sessions use to handle cookies.
Cookies are a mechanism to store state in the mostly stateless HTTP protocol. These details are the cookies attributes.
| QByteArray Tufao::SessionSettings::domain |
The hosts to which cookies generated by this object are used.
| bool Tufao::SessionSettings::httpOnly |
Whether cookies generated by this object should only be used in HTTP requests.
It prevents, for example, scripting engines in the user agent from accessing the cookie.
| QByteArray Tufao::SessionSettings::name |
The name to which cookies generated by this object are used.
This is the main cookie access key.
| QByteArray Tufao::SessionSettings::path |
The set of paths to which cookies generated by this object are used.
Let's name this value as cookiePath and the path component of the uri of a request as requestPath. The cookie will be included in a request if one of the following conditions is true:
| bool Tufao::SessionSettings::secure |
Whether cookies generated by this object should only be used through secure connections.
What "secure" channels means are defined by the user agent. This is typically HTTP over TLS.
| int Tufao::SessionSettings::timeout |
Define the lifetime of cookies generated by this object (a timeout specified in minutes).
The expiration date time is renewed every time SessionSetting generates a cookie.