QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsauthorizationsettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsauthorizationsettings.h
3 ---------------------
4 begin : February 2016
5 copyright : (C) 2016 by Even Rouault
6 email : even.rouault at spatialys.com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSAUTHORIZATIONSETTINGS_H
17#define QGSAUTHORIZATIONSETTINGS_H
18
19#include "qgsauthmanager.h"
20#include "qgsapplication.h"
21#include "qgshttpheaders.h"
22
23#include <QString>
24#include <QNetworkRequest>
25#include <QNetworkReply>
26
27#define SIP_NO_FILE
28
35class CORE_EXPORT QgsAuthorizationSettings
36{
37 public:
38
40 QgsAuthorizationSettings( const QString &userName = QString(), const QString &password = QString(), const QgsHttpHeaders &httpHeaders = QgsHttpHeaders(), const QString &authcfg = QString() );
41
43 bool setAuthorization( QNetworkRequest &request ) const;
44
46 bool setAuthorizationReply( QNetworkReply *reply ) const;
47
49 QString mUserName;
50
52 QString mPassword;
53
56
58 QString mAuthCfg;
59};
60
61#endif // QGSAUTHORIZATIONSETTINGS_H
Utility class that contains authorization information.
QString mPassword
Password for basic http authentication.
QString mAuthCfg
Authentication configuration ID.
QString mUserName
Username for basic http authentication.
QgsHttpHeaders mHttpHeaders
headers for http requests
This class implements simple http header management.