gi-soup-2.4.26: Libsoup bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Soup.Objects.HSTSEnforcer

Description

No description available in the introspection data.

Synopsis

Exported types

newtype HSTSEnforcer Source #

Memory-managed wrapper type.

Constructors

HSTSEnforcer (ManagedPtr HSTSEnforcer) 

Instances

Instances details
Eq HSTSEnforcer Source # 
Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

GObject HSTSEnforcer Source # 
Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

ManagedPtrNewtype HSTSEnforcer Source # 
Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

Methods

toManagedPtr :: HSTSEnforcer -> ManagedPtr HSTSEnforcer

TypedObject HSTSEnforcer Source # 
Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

Methods

glibType :: IO GType

HasParentTypes HSTSEnforcer Source # 
Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

IsGValue (Maybe HSTSEnforcer) Source #

Convert HSTSEnforcer to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe HSTSEnforcer -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe HSTSEnforcer)

type ParentTypes HSTSEnforcer Source # 
Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

type ParentTypes HSTSEnforcer = '[Object, SessionFeature]

class (GObject o, IsDescendantOf HSTSEnforcer o) => IsHSTSEnforcer o Source #

Type class for types which can be safely cast to HSTSEnforcer, for instance with toHSTSEnforcer.

Instances

Instances details
(GObject o, IsDescendantOf HSTSEnforcer o) => IsHSTSEnforcer o Source # 
Instance details

Defined in GI.Soup.Objects.HSTSEnforcer

toHSTSEnforcer :: (MonadIO m, IsHSTSEnforcer o) => o -> m HSTSEnforcer Source #

Cast to HSTSEnforcer, for types for which this is known to be safe. For general casts, use castTo.

Methods

getDomains

hSTSEnforcerGetDomains Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSTSEnforcer a) 
=> a

hstsEnforcer: a HSTSEnforcer

-> Bool

sessionPolicies: whether to include session policies

-> m [Text]

Returns: a newly allocated list of domains. Use g_list_free_full() and free to free the list.

Gets a list of domains for which there are policies in enforcer.

Since: 2.68

getPolicies

hSTSEnforcerGetPolicies Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSTSEnforcer a) 
=> a

hstsEnforcer: a HSTSEnforcer

-> Bool

sessionPolicies: whether to include session policies

-> m [HSTSPolicy]

Returns: a newly allocated list of policies. Use g_list_free_full() and hSTSPolicyFree to free the list.

Gets a list with the policies in enforcer.

Since: 2.68

hasValidPolicy

hSTSEnforcerHasValidPolicy Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSTSEnforcer a) 
=> a

hstsEnforcer: a HSTSEnforcer

-> Text

domain: a domain.

-> m Bool

Returns: True if access to domain should happen over HTTPS, false otherwise.

Gets whether hstsEnforcer has a currently valid policy for domain.

Since: 2.68

isPersistent

hSTSEnforcerIsPersistent Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSTSEnforcer a) 
=> a

hstsEnforcer: a HSTSEnforcer

-> m Bool

Returns: True if hstsEnforcer storage is persistent or False otherwise.

Gets whether hstsEnforcer stores policies persistenly.

Since: 2.68

new

hSTSEnforcerNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m HSTSEnforcer

Returns: a new HSTSEnforcer

Creates a new HSTSEnforcer. The base HSTSEnforcer class does not support persistent storage of HSTS policies, see HSTSEnforcerDB for that.

Since: 2.68

setPolicy

hSTSEnforcerSetPolicy Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSTSEnforcer a) 
=> a

hstsEnforcer: a HSTSEnforcer

-> HSTSPolicy

policy: the policy of the HSTS host

-> m () 

Sets policy to hstsEnforcer. If policy is expired, any existing HSTS policy for its host will be removed instead. If a policy existed for this host, it will be replaced. Otherwise, the new policy will be inserted. If the policy is a session policy, that is, one created with hSTSPolicyNewSessionPolicy, the policy will not expire and will be enforced during the lifetime of hstsEnforcer's Session.

Since: 2.68

setSessionPolicy

hSTSEnforcerSetSessionPolicy Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSTSEnforcer a) 
=> a

hstsEnforcer: a HSTSEnforcer

-> Text

domain: policy domain or hostname

-> Bool

includeSubdomains: True if the policy applies on sub domains

-> m () 

Sets a session policy for domain. A session policy is a policy that is permanent to the lifetime of hstsEnforcer's Session and doesn't expire.

Since: 2.68

Signals

changed

type HSTSEnforcerChangedCallback Source #

Arguments

 = HSTSPolicy

oldPolicy: the old HSTSPolicy value

-> HSTSPolicy

newPolicy: the new HSTSPolicy value

-> IO () 

Emitted when hstsEnforcer changes. If a policy has been added, newPolicy will contain the newly-added policy and oldPolicy will be Nothing. If a policy has been deleted, oldPolicy will contain the to-be-deleted policy and newPolicy will be Nothing. If a policy has been changed, oldPolicy will contain its old value, and newPolicy its new value.

Note that you shouldn't modify the policies from a callback to this signal.

afterHSTSEnforcerChanged :: (IsHSTSEnforcer a, MonadIO m) => a -> ((?self :: a) => HSTSEnforcerChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after hSTSEnforcer #changed callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onHSTSEnforcerChanged :: (IsHSTSEnforcer a, MonadIO m) => a -> ((?self :: a) => HSTSEnforcerChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on hSTSEnforcer #changed callback

hstsEnforced

type HSTSEnforcerHstsEnforcedCallback Source #

Arguments

 = Message

message: the message for which HSTS is being enforced

-> IO () 

Emitted when hstsEnforcer has upgraded the protocol for message to HTTPS as a result of matching its domain with a HSTS policy.

afterHSTSEnforcerHstsEnforced :: (IsHSTSEnforcer a, MonadIO m) => a -> ((?self :: a) => HSTSEnforcerHstsEnforcedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the hstsEnforced signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after hSTSEnforcer #hstsEnforced callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onHSTSEnforcerHstsEnforced :: (IsHSTSEnforcer a, MonadIO m) => a -> ((?self :: a) => HSTSEnforcerHstsEnforcedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the hstsEnforced signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on hSTSEnforcer #hstsEnforced callback