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 m_data.unite(other.
m_data);
133 return m_data.keys();
143 return m_data.value(propertyName, QVariant());
151 return getProperty(SSO_ACCESS_CONTROL_TOKENS).toStringList();
159 template <
class T> T
data()
const {
161 dataImpl.m_data = m_data;
169 QVariantMap
toMap()
const {
return m_data; }
176 SIGNON_SESSION_DECLARE_PROPERTY(QString, Secret)
181 SIGNON_SESSION_DECLARE_PROPERTY(QString, UserName)
187 SIGNON_SESSION_DECLARE_PROPERTY(QString, Realm)
193 SIGNON_SESSION_DECLARE_PROPERTY(QString, NetworkProxy)
200 SIGNON_SESSION_DECLARE_PROPERTY(
int, UiPolicy)
210 SIGNON_SESSION_DECLARE_PROPERTY(QString, Caption)
218 SIGNON_SESSION_DECLARE_PROPERTY(quint32, NetworkTimeout)
224 SIGNON_SESSION_DECLARE_PROPERTY(quint32, WindowId)
233 SIGNON_SESSION_DECLARE_PROPERTY(
bool, RenewToken)
242 #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.