QHstsPolicy¶
The
QHstsPolicy
class specifies that a host supports HTTP Strict Transport Security policy (HSTS). More…
New in version 5.9.
Synopsis¶
Detailed Description¶
HSTS policy defines a period of time during which
QNetworkAccessManager
should only access a host in a secure fashion. HSTS policy is defined by RFC6797.You can set expiry time and host name for this policy, and control whether it applies to subdomains, either in the constructor or by calling
setExpiry()
,setHost()
and setIncludesSubdomains().See also
-
class
QHstsPolicy
¶ QHstsPolicy(expiry, flags, host[, mode=QUrl.DecodedMode])
QHstsPolicy(rhs)
- param host
unicode
- param flags
PolicyFlags
- param expiry
QDateTime
- param rhs
- param mode
ParsingMode
Constructs an invalid (expired) policy with empty host name and subdomains not included.
Constructs
QHstsPolicy
withexpiry
(in UTC);flags
is a value indicating whether this policy must also include subdomains,host
data is interpreted according tomode
.See also
setHost()
ParsingMode
PolicyFlag
Creates a copy of
other
object.
-
PySide2.QtNetwork.QHstsPolicy.
PolicyFlag
¶ Constant
Description
QHstsPolicy.IncludeSubDomains
Indicates whether a policy must include subdomains
-
PySide2.QtNetwork.QHstsPolicy.
expiry
()¶ - Return type
QDateTime
Returns the expiration date for the policy (in UTC).
See also
-
PySide2.QtNetwork.QHstsPolicy.
host
([options=QUrl.FullyDecoded])¶ - Parameters
options –
ComponentFormattingOptions
- Return type
unicode
Returns a host for a given policy, formatted according to
options
.See also
setHost()
host()
ComponentFormattingOptions
-
PySide2.QtNetwork.QHstsPolicy.
includesSubDomains
()¶ - Return type
bool
Returns
true
if this policy also includes subdomains.See also
-
PySide2.QtNetwork.QHstsPolicy.
isExpired
()¶ - Return type
bool
Return
true
if this policy has a valid expiration date and this date is greater than QDateTime::currentGetDateTimeUtc().See also
-
PySide2.QtNetwork.QHstsPolicy.
__ne__
(rhs)¶ - Parameters
rhs –
QHstsPolicy
- Return type
bool
-
PySide2.QtNetwork.QHstsPolicy.
__eq__
(rhs)¶ - Parameters
rhs –
QHstsPolicy
- Return type
bool
-
PySide2.QtNetwork.QHstsPolicy.
setExpiry
(expiry)¶ - Parameters
expiry –
QDateTime
Sets the expiration date for the policy (in UTC) to
expiry
.See also
-
PySide2.QtNetwork.QHstsPolicy.
setHost
(host[, mode=QUrl.DecodedMode])¶ - Parameters
host – unicode
mode –
ParsingMode
Sets a host,
host
data is interpreted according tomode
parameter.See also
host()
setHost()
ParsingMode
-
PySide2.QtNetwork.QHstsPolicy.
setIncludesSubDomains
(include)¶ - Parameters
include –
bool
Sets whether subdomains are included for this policy to
include
.See also
-
PySide2.QtNetwork.QHstsPolicy.
swap
(other)¶ - Parameters
other –
QHstsPolicy
Swaps this policy with the
other
policy.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.