:right-sidebar: True Credential =================================================================== .. currentmodule:: gi.repository.WebKit .. versionadded:: 2.2 .. class:: Credential(**kwargs) :no-contents-entry: Groups information used for user authentication. Constructors ------------ .. rst-class:: interim-class .. class:: Credential :no-index: .. classmethod:: new(username: str, password: str, persistence: ~gi.repository.WebKit.CredentialPersistence) -> ~gi.repository.WebKit.Credential Create a new credential from the provided username, password and persistence mode. .. versionadded:: 2.2 :param username: The username for the new credential :param password: The password for the new credential :param persistence: The :obj:`~gi.repository.WebKit.CredentialPersistence` of the new credential .. classmethod:: new_for_certificate(certificate: ~gi.repository.Gio.TlsCertificate | None, persistence: ~gi.repository.WebKit.CredentialPersistence) -> ~gi.repository.WebKit.Credential Create a new credential from the ``certificate`` and persistence mode. Note that :const:`~gi.repository.WebKit.CredentialPersistence.PERMANENT` is not supported for certificate credentials. .. versionadded:: 2.34 :param certificate: The :obj:`~gi.repository.Gio.TlsCertificate`\, or :const:`None` :param persistence: The :obj:`~gi.repository.WebKit.CredentialPersistence` of the new credential .. classmethod:: new_for_certificate_pin(pin: str, persistence: ~gi.repository.WebKit.CredentialPersistence) -> ~gi.repository.WebKit.Credential Create a new credential from the provided PIN and persistence mode. Note that :const:`~gi.repository.WebKit.CredentialPersistence.PERMANENT` is not supported for certificate pin credentials. .. versionadded:: 2.34 :param pin: The PIN for the new credential :param persistence: The :obj:`~gi.repository.WebKit.CredentialPersistence` of the new credential Methods ------- .. rst-class:: interim-class .. class:: Credential :no-index: .. method:: free() -> None Free the :obj:`~gi.repository.WebKit.Credential`\. .. versionadded:: 2.2 .. method:: get_certificate() -> ~gi.repository.Gio.TlsCertificate Get the certificate currently held by this :obj:`~gi.repository.WebKit.Credential`\. .. versionadded:: 2.34 .. method:: get_password() -> str Get the password currently held by this :obj:`~gi.repository.WebKit.Credential`\. .. versionadded:: 2.2 .. method:: get_persistence() -> ~gi.repository.WebKit.CredentialPersistence Get the persistence mode currently held by this :obj:`~gi.repository.WebKit.Credential`\. .. versionadded:: 2.2 .. method:: get_username() -> str Get the username currently held by this :obj:`~gi.repository.WebKit.Credential`\. .. versionadded:: 2.2 .. method:: has_password() -> bool Determine whether this credential has a password stored. .. versionadded:: 2.2