A simple Qt based browser with no bullshit that supports PKCS#11 tokens (such as the SuisseID).
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/*! @file
|
|
|
|
|
|
|
|
@id $Id$
|
|
|
|
*/
|
|
|
|
// 1 2 3 4 5 6 7 8
|
|
|
|
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
|
|
|
|
|
|
|
#ifndef __AUTHENTICATION_HXX__
|
|
|
|
#define __AUTHENTICATION_HXX__
|
|
|
|
|
|
|
|
#include <ui_authentication.h>
|
|
|
|
#include <QtGui/QDialog>
|
|
|
|
#include <QtNetwork/QAuthenticator>
|
|
|
|
|
|
|
|
class Authentication: public QDialog, protected Ui::Authentication {
|
|
|
|
Q_OBJECT;
|
|
|
|
public:
|
|
|
|
Authentication(QAuthenticator* auth, QWidget* p=0):
|
|
|
|
QDialog(p), _auth(auth) {
|
|
|
|
setupUi(this);
|
|
|
|
_realm->setText(_auth->realm());
|
|
|
|
_user->setText(_auth->user());
|
|
|
|
_password->setText(_auth->password());
|
|
|
|
}
|
|
|
|
public Q_SLOTS:
|
|
|
|
virtual void accept() {
|
|
|
|
_auth->setUser(_user->text());
|
|
|
|
_auth->setPassword(_password->text());
|
|
|
|
QDialog::accept();
|
|
|
|
}
|
|
|
|
virtual void reject() {
|
|
|
|
_auth->setUser(QString());
|
|
|
|
_auth->setPassword(QString());
|
|
|
|
QDialog::reject();
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
QAuthenticator* _auth;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|