예제 #1
0
SignOn::SessionData SSOPasswordPlugin::sessionData(const QString &accountProvider,  QVariantMap authParameters) const
{
    Q_UNUSED(accountProvider);
    Q_UNUSED(authParameters);

    SignOn::SessionData data;
    data.setUiPolicy(SignOn::NoUserInteractionPolicy);
    return data;
}
예제 #2
0
SignOn::SessionData SSOPasswordPlugin::sessionData(const QString &accountProvider,  QVariantMap authParameters,
                                                   bool setUiPolicy) const
{
    Q_UNUSED(accountProvider);
    Q_UNUSED(authParameters);

    SignOn::SessionData data;
    if (setUiPolicy)
        data.setUiPolicy(SignOn::RequestPasswordPolicy);
    return data;
}
예제 #3
0
QList<QByteArray> SSOPasswordPlugin::authentication(const SignOn::SessionData &sessionData,
                                                const QString &serviceType, const QString &userName, int serviceAuthentication) const
{
    QString password = sessionData.Secret();
    QString username = sessionData.UserName();

    if (username.isEmpty())
        username = userName;

    if (serviceType == "imap4") {
        return getIMAPAuthentication(password, username, serviceAuthentication);
    } else if (serviceType == "pop3") {
        return getPOPAuthentication(password, username, serviceAuthentication);
    } else if (serviceType == "smtp") {
        return getSMTPAuthentication(password, username, serviceAuthentication);
    } else {
        return QList<QByteArray>();
    }
}
예제 #4
0
void Session::onResponse(const SignOn::SessionData& data)
{
    qDebug() << Q_FUNC_INFO << data.propertyNames();
    m_data = data;
    emit established();
}