Class
SoupHSTSEnforcer
Description [src]
class Soup.HSTSEnforcer : GObject.Object
  implements Soup.SessionFeature {
  /* No available fields */
}Automatic HTTP Strict Transport Security enforcing for SoupSession.
A SoupHSTSEnforcer stores HSTS policies and enforces them when
required. SoupHSTSEnforcer implements SoupSessionFeature, so you
can add an HSTS enforcer to a session with
soup_session_add_feature() or soup_session_add_feature_by_type().
SoupHSTSEnforcer keeps track of all the HTTPS destinations that,
when connected to, return the Strict-Transport-Security header with
valid values. SoupHSTSEnforcer will forget those destinations
upon expiry or when the server requests it.
When the SoupSession the SoupHSTSEnforcer is attached to queues or
restarts a message, the SoupHSTSEnforcer will rewrite the URI to HTTPS if
the destination is a known HSTS host and is contacted over an insecure
transport protocol (HTTP). Users of SoupHSTSEnforcer are advised to listen
to changes in the SoupMessage:uri property in order to be aware of
changes in the message URI.
Note that SoupHSTSEnforcer does not support any form of long-term
HSTS policy persistence. See SoupHSTSEnforcerDB for a persistent enforcer.
Instance methods
soup_hsts_enforcer_has_valid_policy
Gets whether hsts_enforcer has a currently valid policy for domain.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct SoupHSTSEnforcerClass {
  GObjectClass parent_class;
  gboolean (* is_persistent) (
    SoupHSTSEnforcer* hsts_enforcer
  );
  gboolean (* has_valid_policy) (
    SoupHSTSEnforcer* hsts_enforcer,
    const char* domain
  );
  void (* changed) (
    SoupHSTSEnforcer* enforcer,
    SoupHSTSPolicy* old_policy,
    SoupHSTSPolicy* new_policy
  );
  
}Class structure for SoupHSTSEnforcer.
Class members
- parent_class: GObjectClass
- The parent class. 
- is_persistent: gboolean (* is_persistent) ( SoupHSTSEnforcer* hsts_enforcer )
- The - is_persistentfunction advertises whether the enforcer is persistent or whether changes made to it will be lost when the underlying- SoupSessionis finished.
- has_valid_policy: gboolean (* has_valid_policy) ( SoupHSTSEnforcer* hsts_enforcer, const char* domain )
- The - has_valid_policyfunction is called to check whether there is a valid policy for the given domain. This method should return- TRUEfor- SoupHSTSEnforcerto change the scheme of the- GUriin the- SoupMessageto HTTPS. Implementations might want to chain up to the- has_valid_policyin the parent class to check, for instance, for runtime policies.
- changed: void (* changed) ( SoupHSTSEnforcer* enforcer, SoupHSTSPolicy* old_policy, SoupHSTSPolicy* new_policy )
- The class closure for the - SoupHSTSEnforcer::changedsignal.
Virtual methods
Soup.HSTSEnforcerClass.has_valid_policy
Gets whether hsts_enforcer has a currently valid policy for domain.