38 #include <QStringList> 41 #include <SignOn/libsignoncommon.h> 53 #define SIGNON_SESSION_DECLARE_PROPERTY(type_, name_) \ 54 void set##name_(const type_ &value ) { m_data.insert(QLatin1String(#name_), value); } \ 55 type_ name_() const { return m_data.value(QLatin1String(#name_)).value<type_>(); } 62 #define SSO_ACCESS_CONTROL_TOKENS QLatin1String("AccessControlTokens") 100 SessionData(
const QVariantMap &data = QVariantMap()) { m_data = data; }
124 for (
auto it = other.
m_data.constBegin(), itEnd = other.
m_data.constEnd(); it != itEnd; ++it) {
125 m_data[it.key()] = it.value();
135 return m_data.keys();
145 return m_data.value(propertyName, QVariant());
153 return getProperty(SSO_ACCESS_CONTROL_TOKENS).toStringList();
161 template <
class T> T
data()
const {
163 dataImpl.m_data = m_data;
171 QVariantMap
toMap()
const {
return m_data; }
178 SIGNON_SESSION_DECLARE_PROPERTY(QString, Secret)
183 SIGNON_SESSION_DECLARE_PROPERTY(QString, UserName)
189 SIGNON_SESSION_DECLARE_PROPERTY(QString, Realm)
195 SIGNON_SESSION_DECLARE_PROPERTY(QString, NetworkProxy)
202 SIGNON_SESSION_DECLARE_PROPERTY(
int, UiPolicy)
212 SIGNON_SESSION_DECLARE_PROPERTY(QString, Caption)
220 SIGNON_SESSION_DECLARE_PROPERTY(quint32, NetworkTimeout)
226 SIGNON_SESSION_DECLARE_PROPERTY(quint32, WindowId)
235 SIGNON_SESSION_DECLARE_PROPERTY(
bool, RenewToken)
244 #endif // SESSIONDATA_H SignonUiPolicy
Policy to define how the plugin interacts with the user.
Data container to hold values for authentication session.
SessionData & operator+=(const SessionData &other)
Addition operator.
SessionData(const SessionData &other)
Copy constructor.
const QVariant getProperty(const QString &propertyName) const
Access the list of runtime existing properties of the SessionData.
T data() const
Creates an instance of type T, which must be derived from SessionData.
SessionData & operator=(const SessionData &other)
Assignment operator.
SessionData(const QVariantMap &data=QVariantMap())
Constructor.
QVariantMap toMap() const
Gets the QVariantMap of session parameters.
QVariantMap m_data
Declares the property Secret setter and getter.
QStringList getAccessControlTokens() const
Gets the access control tokens that the requesting application has.
const QStringList propertyNames() const
Access the list of runtime existing properties of the SessionData.