Changeset View
Changeset View
Standalone View
Standalone View
providers/ghprovider/ghresource.h
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 47 | public: | |||
---|---|---|---|---|---|
78 | * This method will eventually emit the authenticated signal. | 78 | * This method will eventually emit the authenticated signal. | ||
79 | * | 79 | * | ||
80 | * @param name The username of the current user. | 80 | * @param name The username of the current user. | ||
81 | * @param password The password used to login the current user. | 81 | * @param password The password used to login the current user. | ||
82 | */ | 82 | */ | ||
83 | void authenticate(const QString &name, const QString &password); | 83 | void authenticate(const QString &name, const QString &password); | ||
84 | 84 | | |||
85 | /** | 85 | /** | ||
86 | * Authenticate the current user with the two factor authentication code. | ||||
87 | * Must be called after a call to authenticate. | ||||
88 | * | ||||
89 | * @param code The two factor authentication code. | ||||
90 | */ | ||||
91 | void twoFactorAuthenticate(const QString &code); | ||||
92 | | ||||
93 | /** | ||||
86 | * Revoke an access to the Github API (a.k.a. log out the current user). | 94 | * Revoke an access to the Github API (a.k.a. log out the current user). | ||
87 | * | 95 | * | ||
88 | * @param id The id of the currently valid authorization. | 96 | * @param id The id of the currently valid authorization. | ||
89 | * @param name The name of the current user. | 97 | * @param name The name of the current user. | ||
90 | * @param password The Github API requires the password again to perform | 98 | * @param password The Github API requires the password again to perform | ||
91 | * this action. | 99 | * this action. | ||
92 | */ | 100 | */ | ||
93 | void revokeAccess(const QString &id, const QString &name, const QString &password); | 101 | void revokeAccess(const QString &id, const QString &name, const QString &password); | ||
Show All 30 Lines | 128 | signals: | |||
124 | * successful. | 132 | * successful. | ||
125 | * | 133 | * | ||
126 | * @param id The id of the authorization. Empty if something went wrong. | 134 | * @param id The id of the authorization. Empty if something went wrong. | ||
127 | * @param token The authorization token. Empty if something went wrong. | 135 | * @param token The authorization token. Empty if something went wrong. | ||
128 | */ | 136 | */ | ||
129 | void authenticated(const QByteArray &id, const QByteArray &token); | 137 | void authenticated(const QByteArray &id, const QByteArray &token); | ||
130 | 138 | | |||
131 | /** | 139 | /** | ||
140 | * This signal is sent if two factor authentication is requested by GitHub. | ||||
141 | */ | ||||
142 | void twoFactorRequested(); | ||||
kfunk: Rename: `twoFactorRequested` -> `twoFactorAuthRequested` | |||||
143 | | ||||
144 | /** | ||||
132 | * This signal is emitted when the model containing repos has | 145 | * This signal is emitted when the model containing repos has | ||
133 | * been updated. | 146 | * been updated. | ||
134 | */ | 147 | */ | ||
135 | void reposUpdated(); | 148 | void reposUpdated(); | ||
136 | 149 | | |||
137 | /** | 150 | /** | ||
138 | * This signal is fired when the list of organizations for the current | 151 | * This signal is fired when the list of organizations for the current | ||
139 | * user has been updated. | 152 | * user has been updated. | ||
Show All 25 Lines | 158 | private slots: | |||
165 | * @param job The job returned after the HTTP request has finished. | 178 | * @param job The job returned after the HTTP request has finished. | ||
166 | * @param data The data returned by the HTTP response. | 179 | * @param data The data returned by the HTTP response. | ||
167 | */ | 180 | */ | ||
168 | void slotOrgs(KIO::Job *job, const QByteArray &data); | 181 | void slotOrgs(KIO::Job *job, const QByteArray &data); | ||
169 | 182 | | |||
170 | private: | 183 | private: | ||
171 | ProviderModel *m_model; | 184 | ProviderModel *m_model; | ||
172 | QByteArray m_temp, m_orgTemp; | 185 | QByteArray m_temp, m_orgTemp; | ||
186 | QString m_tfHttpHeader; | ||||
173 | }; | 187 | }; | ||
174 | 188 | | |||
175 | } // End of namespace gh | 189 | } // End of namespace gh | ||
176 | 190 | | |||
177 | 191 | | |||
178 | #endif // GH_RESOURCE_H | 192 | #endif // GH_RESOURCE_H |
Rename: twoFactorRequested -> twoFactorAuthRequested