KPasswdServerClient

Search for usage in LXR

KPasswdServerClient Class Reference

#include <KPasswdServerClient>

Public Member Functions

 KPasswdServerClient ()
 
 KPasswdServerClient (const KPasswdServerClient &)=delete
 
 ~KPasswdServerClient ()
 
void addAuthInfo (const KIO::AuthInfo &info, qlonglong windowId)
 
bool checkAuthInfo (KIO::AuthInfo *info, qlonglong windowId, qlonglong usertime)
 
KPasswdServerClientoperator= (const KPasswdServerClient &)=delete
 
int queryAuthInfo (KIO::AuthInfo *info, const QString &errorMsg, qlonglong windowId, qlonglong usertime)
 
void removeAuthInfo (const QString &host, const QString &protocol, const QString &user)
 

Detailed Description

Interface class for kpasswdserver.

KIO workers should not use this directly but via the WorkerBase API.

Since
5.30

Definition at line 33 of file kpasswdserverclient.h.

Constructor & Destructor Documentation

◆ KPasswdServerClient()

KPasswdServerClient::KPasswdServerClient ( )

Creates a client instance for kpasswdserver.

The instance should be kept for the lifetime of the process, not created for each request.

Definition at line 29 of file kpasswdserverclient.cpp.

◆ ~KPasswdServerClient()

KPasswdServerClient::~KPasswdServerClient ( )

Destructor.

Definition at line 36 of file kpasswdserverclient.cpp.

Member Function Documentation

◆ addAuthInfo()

void KPasswdServerClient::addAuthInfo ( const KIO::AuthInfo & info,
qlonglong windowId )

Manually add authentication information to kpasswdserver's cache.

Parameters
infoinformation to add
windowIdused as parent window for dialogs, comes from QWidget::winId() on the toplevel widget

Definition at line 121 of file kpasswdserverclient.cpp.

◆ checkAuthInfo()

bool KPasswdServerClient::checkAuthInfo ( KIO::AuthInfo * info,
qlonglong windowId,
qlonglong usertime )

Check if kpasswdserver has cached authentication information regarding an AuthInfo object.

Parameters
infoinformation to check cache for
windowIdused as parent for dialogs, comes from QWidget::winId() on the toplevel widget
usertimethe X11 user time from the calling application, so that any dialog (e.g. wallet password) respects focus-prevention rules. Use KUserTimestamp::userTimestamp in the GUI application from which the request originates.
Returns
true if kpasswdserver provided cached information, false if not
Remarks
info will contain the results of the check. To see if information was retrieved, check info.isModified().

Definition at line 41 of file kpasswdserverclient.cpp.

◆ queryAuthInfo()

int KPasswdServerClient::queryAuthInfo ( KIO::AuthInfo * info,
const QString & errorMsg,
qlonglong windowId,
qlonglong usertime )

Let kpasswdserver ask the user for authentication information.

Parameters
infoinformation to query the user for
errorMsgerror message that will be displayed to the user
windowIdused as parent for dialogs, comes from QWidget::winId() on the toplevel widget
usertimethe X11 user time from the calling application, so that the dialog (e.g. wallet password) respects focus-prevention rules. Use KUserTimestamp::userTimestamp in the GUI application from which the request originates.
Returns
a KIO error code: KJob::NoError (0) on success, otherwise ERR_USER_CANCELED if the user canceled, or ERR_PASSWD_SERVER if we couldn't communicate with kpasswdserver.
Remarks
If NoError is returned, then info will contain the authentication information that was retrieved.

Definition at line 75 of file kpasswdserverclient.cpp.

◆ removeAuthInfo()

void KPasswdServerClient::removeAuthInfo ( const QString & host,
const QString & protocol,
const QString & user )

Manually remove authentication information from kpasswdserver's cache.

Parameters
hosthostname of the information to remove
protocolprotocol to remove information for
userusername to remove information for

Definition at line 126 of file kpasswdserverclient.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.