class QWebEngineWebAuthUxRequest

The QWebEngineWebAuthUxRequest class encapsulates the data of a WebAuth UX request. More

Inheritance diagram of PySide6.QtWebEngineCore.QWebEngineWebAuthUxRequest

Added in version 6.7.

Synopsis

Properties

  • pinRequestᅟ - WebAuth request’s PIN request information

  • relyingPartyIdᅟ - WebAuth request’s relying party id

  • requestFailureReasonᅟ - WebAuth request’s failure reason

  • stateᅟ - WebAuth request’s current UX state

  • userNamesᅟ - Available user names for the resident credential support. This is needed when the current WebAuth request’s UX state is SelectAccount. The WebAuth dialog displays user names. The user needs to select an account to proceed

Methods

Slots

Signals

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

This class contains the information and API for WebAuth UX. WebAuth may require user interaction during the authentication process. These requests are handled by displaying a dialog to users. QtWebEngine currently supports user verification, resident credentials, and display request failure UX requests.

QWebEngineWebAuthUxRequest models a WebAuth UX request throughout its life cycle, starting with showing a UX dialog, updating it’s content through state changes, and finally closing the dialog.

WebAuth UX requests are normally triggered when the authenticator requires user interaction. It is the QWebEnginePage ‘s responsibility to notify the application of the new WebAuth UX requests, which it does by emitting the webAuthUxRequested signal together with a newly created QWebEngineWebAuthUxRequest . The application can then examine this request and display a WebAuth UX dialog.

The QWebEngineWebAuthUxRequest object periodically emits the stateChanged signal to notify potential observers of the current WebAuth UX states. The observers update the WebAuth dialog accordingly.

For more information about how to handle web engine authenticator requests, see the Simple Browser .

class WebAuthUxState

This enum describes the state of the current WebAuth UX request.

Constant

Description

QWebEngineWebAuthUxRequest.WebAuthUxState.NotStarted

WebAuth UX request not started yet.

QWebEngineWebAuthUxRequest.WebAuthUxState.SelectAccount

The authenticator requires resident credential details. The application needs to display an account details dialog, and the user needs to select an account to proceed.

QWebEngineWebAuthUxRequest.WebAuthUxState.CollectPin

The authenticator requires user verification. The application needs to display a PIN request dialog.

QWebEngineWebAuthUxRequest.WebAuthUxState.FinishTokenCollection

The authenticator requires token/user verification (like tap on the FIDO key) to complete the process.

QWebEngineWebAuthUxRequest.WebAuthUxState.RequestFailed

WebAuth request failed. Display error details.

QWebEngineWebAuthUxRequest.WebAuthUxState.Cancelled

WebAuth request is cancelled. Close the WebAuth dialog.

QWebEngineWebAuthUxRequest.WebAuthUxState.Completed

WebAuth request is completed. Close the WebAuth dialog.

class PinEntryReason

This enum describes the reasons that may prompt the authenticator to ask for a PIN.

Constant

Description

QWebEngineWebAuthUxRequest.PinEntryReason.Set

A new PIN is being set.

QWebEngineWebAuthUxRequest.PinEntryReason.Change

The existing PIN must be changed before using this authenticator.

QWebEngineWebAuthUxRequest.PinEntryReason.Challenge

The existing PIN is being collected to prove user verification.

class PinEntryError

This enum describes the errors that may prompt the authenticator to ask for a PIN.

Constant

Description

QWebEngineWebAuthUxRequest.PinEntryError.NoError

No error has occurred.

QWebEngineWebAuthUxRequest.PinEntryError.InternalUvLocked

Internal UV is locked, so we are falling back to PIN.

QWebEngineWebAuthUxRequest.PinEntryError.WrongPin

The PIN the user entered does not match the authenticator PIN.

QWebEngineWebAuthUxRequest.PinEntryError.TooShort

The new PIN the user entered is too short.

QWebEngineWebAuthUxRequest.PinEntryError.InvalidCharacters

The new PIN the user entered contains invalid characters.

QWebEngineWebAuthUxRequest.PinEntryError.SameAsCurrentPin

The new PIN the user entered is the same as the currently set PIN.

class RequestFailureReason

This enum describes the reason for WebAuth request failure.

Constant

Description

QWebEngineWebAuthUxRequest.RequestFailureReason.Timeout

The authentication session has timed out.

QWebEngineWebAuthUxRequest.RequestFailureReason.KeyNotRegistered

Key is not registered with the authenticator.

QWebEngineWebAuthUxRequest.RequestFailureReason.KeyAlreadyRegistered

Key is already registered with the authenticator. Try to register with another Key or use another authenticator.

QWebEngineWebAuthUxRequest.RequestFailureReason.SoftPinBlock

The authenticator is blocked as the user entered the wrong key many times.

QWebEngineWebAuthUxRequest.RequestFailureReason.HardPinBlock

The authenticator is blocked as the user entered the wrong key many times and reset the PIN to use the specific authenticator again.

QWebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorRemovedDuringPinEntry

Authenticator removed during PIN entry.

QWebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorMissingResidentKeys

Authenticator doesn’t have resident key support.

QWebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorMissingUserVerification

Authenticator doesn’t have user verification support.

QWebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorMissingLargeBlob

Authenticator doesn’t have large blob support.

QWebEngineWebAuthUxRequest.RequestFailureReason.NoCommonAlgorithms

No common algorithm.

QWebEngineWebAuthUxRequest.RequestFailureReason.StorageFull

The resident credential could not be created because the authenticator has insufficient storage.

QWebEngineWebAuthUxRequest.RequestFailureReason.UserConsentDenied

User consent denied.

QWebEngineWebAuthUxRequest.RequestFailureReason.WinUserCancelled

The user clicked Cancel in the native windows UI.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property pinRequestᅟ: QWebEngineWebAuthPinRequest

This property holds The WebAuth request’s PIN request information..

This is needed when the current WebAuth request state is CollectPin . WebAuth Dialog displays a PIN request dialog. The user needs to enter a PIN and invoke setPin() to proceed.

Access functions:
property relyingPartyIdᅟ: str

This property holds The WebAuth request’s relying party id..

Access functions:
property requestFailureReasonᅟ: QWebEngineWebAuthUxRequest.RequestFailureReason

This property holds The WebAuth request’s failure reason..

Access functions:
property stateᅟ: QWebEngineWebAuthUxRequest.WebAuthUxState

This property holds The WebAuth request’s current UX state..

stateChanged() is emitted when the current state changes. Update the WebAuth dialog in reponse to the changes in state.

Access functions:
property userNamesᅟ: list of strings

This property holds The available user names for the resident credential support. This is needed when the current WebAuth request’s UX state is SelectAccount . The WebAuth dialog displays user names. The user needs to select an account to proceed..

Access functions:
cancel()

Cancels the current WebAuth request.

pinRequest()
Return type:

QWebEngineWebAuthPinRequest

Getter of property pinRequestᅟ .

relyingPartyId()
Return type:

str

Getter of property relyingPartyIdᅟ .

requestFailureReason()
Return type:

RequestFailureReason

Getter of property requestFailureReasonᅟ .

retry()

Retries the current WebAuth request.

See also

stateChanged()

setPin(pin)
Parameters:

pin – str

Sends the pin to the authenticator that prompts for a PIN. This is needed when the current WebAuth request’s UX state is CollectPin . The WebAuth request is blocked until the user responds with a PIN.

setSelectedAccount(selectedAccount)
Parameters:

selectedAccount – str

Sends the selectedAccount name to the authenticator. This is needed when the current WebAuth request’s UX state is SelectAccount . The WebAuth request is blocked until the user selects an account and invokes this method.

state()
Return type:

WebAuthUxState

Getter of property stateᅟ .

stateChanged(state)
Parameters:

stateWebAuthUxState

This signal is emitted whenever the WebAuth UX’s state changes.

Notification signal of property stateᅟ .

userNames()
Return type:

list of strings

Getter of property userNamesᅟ .