gi-webkit2-4.0.30: WebKit2 bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2.Objects.AuthenticationRequest

Description

Represents an authentication request.

Whenever a client attempts to load a page protected by HTTP authentication, credentials will need to be provided to authorize access. To allow the client to decide how it wishes to handle authentication, WebKit will fire a WebView::authenticate signal with a WebKitAuthenticationRequest object to provide client side authentication support. Credentials are exposed through the Credential object.

In case the client application does not wish to handle this signal WebKit will provide a default handler. To handle authentication asynchronously, simply increase the reference count of the WebKitAuthenticationRequest object.

Synopsis

Exported types

newtype AuthenticationRequest Source #

Memory-managed wrapper type.

Constructors

AuthenticationRequest (ManagedPtr AuthenticationRequest) 

class (GObject o, IsDescendantOf AuthenticationRequest o) => IsAuthenticationRequest o Source #

Type class for types which can be safely cast to AuthenticationRequest, for instance with toAuthenticationRequest.

Instances

Instances details
(GObject o, IsDescendantOf AuthenticationRequest o) => IsAuthenticationRequest o Source # 
Instance details

Defined in GI.WebKit2.Objects.AuthenticationRequest

toAuthenticationRequest :: (MonadIO m, IsAuthenticationRequest o) => o -> m AuthenticationRequest Source #

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

Methods

authenticate

authenticationRequestAuthenticate Source #

Arguments

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

request: a AuthenticationRequest

-> Maybe Credential

credential: A Credential, or Nothing

-> m () 

Authenticate the AuthenticationRequest.

Authenticate the AuthenticationRequest using the Credential supplied. To continue without credentials, pass Nothing as credential.

Since: 2.2

canSaveCredentials

authenticationRequestCanSaveCredentials Source #

Arguments

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

request: a AuthenticationRequest

-> m Bool

Returns: True if WebKit can store credentials or False otherwise.

Determine whether this AuthenticationRequest should allow the storage of credentials.

Determine whether the authentication method associated with this AuthenticationRequest should allow the storage of credentials. This will return False if WebKit doesn't support credential storing, if private browsing is enabled, or if persistent credential storage has been disabled in WebsiteDataManager, unless credentials saving has been explicitly enabled with authenticationRequestSetCanSaveCredentials.

Since: 2.2

cancel

authenticationRequestCancel Source #

Arguments

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

request: a AuthenticationRequest

-> m () 

Cancel the authentication challenge.

This will also cancel the page loading and result in a WebView::loadFailed signal with a NetworkError of type NetworkErrorCancelled being emitted.

Since: 2.2

getCertificatePinFlags

getHost

authenticationRequestGetHost Source #

Arguments

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

request: a AuthenticationRequest

-> m Text

Returns: The host of request.

Get the host that this authentication challenge is applicable to.

Since: 2.2

getPort

authenticationRequestGetPort Source #

Arguments

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

request: a AuthenticationRequest

-> m Word32

Returns: The port of request.

Get the port that this authentication challenge is applicable to.

Since: 2.2

getProposedCredential

authenticationRequestGetProposedCredential Source #

Arguments

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

request: a AuthenticationRequest

-> m Credential

Returns: A Credential encapsulating credential details or Nothing if there is no stored credential.

Get the Credential of the proposed authentication challenge.

Get the Credential of the proposed authentication challenge that was stored from a previous session. The client can use this directly for authentication or construct their own Credential.

Since: 2.2

getRealm

authenticationRequestGetRealm Source #

Arguments

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

request: a AuthenticationRequest

-> m Text

Returns: The realm of request.

Get the realm that this authentication challenge is applicable to.

Since: 2.2

getScheme

authenticationRequestGetScheme Source #

Arguments

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

request: a AuthenticationRequest

-> m AuthenticationScheme

Returns: The AuthenticationScheme of request.

Get the authentication scheme of the authentication challenge.

Since: 2.2

getSecurityOrigin

authenticationRequestGetSecurityOrigin Source #

Arguments

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

request: a AuthenticationRequest

-> m SecurityOrigin

Returns: a newly created SecurityOrigin.

Get the SecurityOrigin that this authentication challenge is applicable to.

Since: 2.30

isForProxy

authenticationRequestIsForProxy Source #

Arguments

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

request: a AuthenticationRequest

-> m Bool

Returns: True if authentication is for a proxy or False otherwise.

Determine whether the authentication challenge is associated with a proxy server.

Determine whether the authentication challenge is associated with a proxy server rather than an "origin" server.

Since: 2.2

isRetry

authenticationRequestIsRetry Source #

Arguments

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

request: a AuthenticationRequest

-> m Bool

Returns: True if authentication attempt is a retry or False otherwise.

Determine whether this this is a first attempt or a retry for this authentication challenge.

Since: 2.2

setCanSaveCredentials

authenticationRequestSetCanSaveCredentials Source #

Arguments

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

request: a AuthenticationRequest

-> Bool

enabled: value to set

-> m () 

Set whether the authentication method associated with request should allow the storage of credentials.

Set whether the authentication method associated with request should allow the storage of credentials. This should be used by applications handling their own credentials storage to indicate that it should be supported even when internal credential storage is disabled or unsupported. Note that storing of credentials will not be allowed on ephemeral sessions in any case.

Since: 2.30

setProposedCredential

authenticationRequestSetProposedCredential Source #

Arguments

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

request: a AuthenticationRequest

-> Credential

credential: a Credential, or Nothing

-> m () 

Set the Credential of the proposed authentication challenge.

Set the Credential of the proposed authentication challenge that was stored from a previous session. This should only be used by applications handling their own credential storage. (When using the default WebKit credential storage, authenticationRequestGetProposedCredential already contains previously-stored credentials.) Passing a Nothing credential will clear the proposed credential.

Since: 2.30

Signals

authenticated

type AuthenticationRequestAuthenticatedCallback Source #

Arguments

 = Credential

credential: the Credential accepted

-> IO () 

This signal is emitted when the user authentication request succeeded. Applications handling their own credential storage should connect to this signal to save the credentials.

Since: 2.30

afterAuthenticationRequestAuthenticated :: (IsAuthenticationRequest a, MonadIO m) => a -> ((?self :: a) => AuthenticationRequestAuthenticatedCallback) -> m SignalHandlerId Source #

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

after authenticationRequest #authenticated 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.

onAuthenticationRequestAuthenticated :: (IsAuthenticationRequest a, MonadIO m) => a -> ((?self :: a) => AuthenticationRequestAuthenticatedCallback) -> m SignalHandlerId Source #

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

on authenticationRequest #authenticated callback

cancelled

type AuthenticationRequestCancelledCallback = IO () Source #

This signal is emitted when the user authentication request is cancelled. It allows the application to dismiss its authentication dialog in case of page load failure for example.

Since: 2.2

afterAuthenticationRequestCancelled :: (IsAuthenticationRequest a, MonadIO m) => a -> ((?self :: a) => AuthenticationRequestCancelledCallback) -> m SignalHandlerId Source #

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

after authenticationRequest #cancelled 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.

onAuthenticationRequestCancelled :: (IsAuthenticationRequest a, MonadIO m) => a -> ((?self :: a) => AuthenticationRequestCancelledCallback) -> m SignalHandlerId Source #

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

on authenticationRequest #cancelled callback