libfuoten  0.8.1
Qt based library to access the ownCloud/Nextcloud News App API
Public Member Functions | Protected Member Functions | List of all members
DeleteAppPassword Class Reference

#include <Fuoten/API/DeleteAppPassword>

Inheritance diagram for DeleteAppPassword:
Component

Public Member Functions

 DeleteAppPassword (QObject *parent=nullptr)
 
 ~DeleteAppPassword () override
 
Q_INVOKABLE void execute () override
 
- Public Member Functions inherited from Component
 Component (QObject *parent=nullptr)
 
 ~Component () override
 
AbstractConfigurationconfiguration () const
 
Errorerror () const
 
bool inOperation () const
 
bool isUseStorageEnabled () const
 
AbstractNotificatornotificator () const
 
quint16 requestTimeout () const
 
void setConfiguration (AbstractConfiguration *nAbstractConfiguration)
 
void setNotificator (AbstractNotificator *notificator)
 
void setRequestTimeout (quint16 seconds)
 
void setStorage (AbstractStorage *localStorage)
 
void setUseStorage (bool useStorage)
 
void setWipeManager (WipeManager *wipeManager)
 
AbstractStoragestorage () const
 
WipeManagerwipeManager () const
 

Protected Member Functions

void successCallback () override
 
- Protected Member Functions inherited from Component
void addRequestHeader (const QByteArray &headerName, const QByteArray &headerValue)
 
void addRequestHeaders (const QHash< QByteArray, QByteArray > &headers)
 
virtual bool checkInput ()
 
virtual bool checkOutput ()
 
virtual void extractError (QNetworkReply *reply)
 
QJsonDocument jsonResult () const
 
void notify (const Error *e) const
 
void notify (AbstractNotificator::Type type, QtMsgType severity, const QVariant &data) const
 
QHash< QByteArray, QByteArray > requestHeaders () const
 
void sendRequest ()
 
void setApiRoute (const QString &route)
 
void setApiRoute (const QStringList &routeParts)
 
void setError (Error *nError)
 
void setExpectedJSONType (ExpectedJSONType type)
 
void setInOperation (bool nInOperation)
 
void setNetworkOperation (QNetworkAccessManager::Operation operation)
 
void setPayload (const QByteArray &payload)
 
void setPayload (const QJsonObject &payload)
 
void setRequestHeaders (const QHash< QByteArray, QByteArray > &headers)
 
void setRequiresAuth (bool reqAuth)
 
void setUrlQuery (const QUrlQuery &query)
 

Additional Inherited Members

- Public Types inherited from Component
enum  ExpectedJSONType : quint8 { Empty = 0, Array = 1, Object = 2 }
 
- Properties inherited from Component
Fuoten::AbstractConfiguration configuration
 
Fuoten::Error error
 
bool inOperation
 
Fuoten::AbstractNotificator notificator
 
quint16 requestTimeout
 
Fuoten::AbstractStorage storage
 
bool useStorage
 
Fuoten::WipeManager wipeManager
 
- Signals inherited from Component
void configurationChanged (Fuoten::AbstractConfiguration *configuration)
 
void errorChanged (Fuoten::Error *error)
 
void failed (Fuoten::Error *error)
 
void inOperationChanged (bool inOperation)
 
void notificatorChanged (Fuoten::AbstractNotificator *notificator)
 
void requestTimeoutChanged (quint16 requestTimeout)
 
void sslErrors (QNetworkReply *reply, const QList< QSslError > &errors)
 
void storageChanged (Fuoten::AbstractStorage *storage)
 
void succeeded (const QJsonDocument &result)
 
void useStorageChanged (bool useStorage)
 
void wipeManagerChanged (Fuoten::WipeManager *wipeManager)
 
- Static Public Member Functions inherited from Component
static AbstractConfigurationdefaultConfiguration ()
 
static AbstractNotificatordefaultNotificator ()
 
static AbstractStoragedefaultStorage ()
 
static WipeManagerdefaultWipeManager ()
 
static AbstractNamFactorynetworkAccessManagerFactory ()
 
static void setDefaultConfiguration (AbstractConfiguration *config)
 
static void setDefaultNotificator (AbstractNotificator *notificator)
 
static void setDefaultStorage (AbstractStorage *storage)
 
static void setDefaultWipeManager (WipeManager *wipeManager)
 
static void setNetworkAccessManagerFactory (AbstractNamFactory *factory)
 

Detailed Description

Deletes application passwords.

Nextcloud’s OCS API supports the deletion of application passwords that have been created manually or by using the Login Flow mechanism or by converting “normal“ passwords to application passwords. This API class can be used to delete such application passwords on the remote Nextcloud server that have been stored in the configuration. This is useful if you delete the local account and want to also clean up the application password used for it on the remote server.

Note
This class will not remove the deleted application password from your local storage/settings. The Nextcloud API docs recommend to even delete the local stored password if the remote deletion fails. So you should connect to both signals Component::failed() and Component::succeeded() to delete the local data after executing this API command.
Since
0.8.0
Mandatory properties
Component::configuration
API route
Not part of the News App API, uses general Nextcloud OCS API at /ocs/v2.php/core/apppassword
Method
DELETE

Constructor & Destructor Documentation

◆ DeleteAppPassword()

DeleteAppPassword ( QObject *  parent = nullptr)
explicit

Constructs a new DeleteAppPassword object with the given parent.

◆ ~DeleteAppPassword()

~DeleteAppPassword ( )
overridedefault

Destroys the DeleteAppPassword object.

Member Function Documentation

◆ execute()

void execute ( )
overridevirtual

Executes the API request.

Implements Component.

◆ successCallback()

void successCallback ( )
overrideprotectedvirtual

Simply emits Component::succeeded() signal.

Implements Component.