Pages
API Documentation
On this page

SignOn::SessionData Class

Data container to hold values for authentication session. More...

  • Header: #include <SignOn/SessionData>
  • CMake: find_package(SignOnQt6 REQUIRED)
    target_link_libraries(mytarget PRIVATE SignOnQt6::SignOnQt6)

List of all members, including inherited members

Public Functions

Detailed Description

Inherit this class if you want to extend the property range.

Warning: All this class' definitions must be inline.

Member Function Documentation

SessionData::SessionData(const QVariantMap &data = QVariantMap())

Constructor. Creates a SessionData containing data.

Note: Internal use only recommended. As a SSO client application developer use setters/getters for specific SessionData properties.

SessionData::SessionData(const SignOn::SessionData &other)

Copy constructor, copying other to this instance.

template <typename T> T SessionData::data() const

Creates an instance of type T, which must be derived from SessionData. The instance will contain the data of this instance.

QStringList SessionData::getAccessControlTokens() const

Gets the access control tokens that the requesting application has.

Note: To be used by the plugins developers only.

const QVariant SessionData::getProperty(const QString &propertyName) const

Access the property propertyName of the SessionData. Returns the property's value, or an empty variant if the property does not exist at runtime.

const QStringList SessionData::propertyNames() const

Access the list of runtime existing properties of the SessionData. Returns the property names.

void SessionData::setCaption(const QString &value)

QString SessionData::Caption() const

The property Caption. Caption is to tell user which application/credentials/provider is requesting signon-ui.

Note: Caption is taken from database if not defined by application or authentication plugin.

void SessionData::setNetworkProxy(const QString &value)

QString SessionData::NetworkProxy() const

The property NetworkProxy: the network proxy to be used instead of system default.

void SessionData::setNetworkTimeout(const quint32 &value)

quint32 SessionData::NetworkTimeout() const

The property NetworkTimeout: the timeout for network related operations in milliseconds. To be used when a remote service does not reply in a reasonable amount of time.

void SessionData::setRealm(const QString &value)

QString SessionData::Realm() const

The property Realm: the realm that is used for authentication.

void SessionData::setRenewToken(const bool &value)

bool SessionData::RenewToken() const

The property RenewToken. This is used by a signon plugin to check whether the access token has to be renewed. When this property is set, the signon plugin will remove the old set of access tokens and get a new set.

void SessionData::setSecret(const QString &value)

QString SessionData::Secret() const

The property Secret: the secret.

void SessionData::setUiPolicy(const int &value)

int SessionData::UiPolicy() const

The property UiPolicy. Use UiPolicy to define how plugin interacts with the user.

See also SignOn::SignonUiPolicy

void SessionData::setUserName(const QString &value)

QString SessionData::UserName() const

The property UserName: the username.

void SessionData::setWindowId(const quint32 &value)

quint32 SessionData::WindowId() const

The property WindowId. This is to be used for setting signon-ui dialog application modal.

QVariantMap SessionData::toMap() const

Gets the QVariantMap of session parameters.

SignOn::SessionData &SessionData::operator+=(const SignOn::SessionData &other)

Addition operator, adding other to this instance. Returns a reference to this object.

SignOn::SessionData &SessionData::operator=(const SignOn::SessionData &other)

Assignment operator, assigning other to this instance. Returns a reference to this object.

enum SignonUiPolicy

Policy to define how the plugin interacts with the user. This is a hint for plugin how to handle user interaction. NoUserInteractionPolicy does not allow any ui interaction to happen and plugin will get error reply QUERY_ERROR_FORBIDDEN.

Constant Value Description
SignOn::SessionData::DefaultPolicy 0 Plugin can decide when to show ui.
SignOn::SessionData::RequestPasswordPolicy 1 Force user to enter password.
SignOn::SessionData::NoUserInteractionPolicy 2 No ui elements are shown to user.
SignOn::SessionData::ValidationPolicy 3 UI elements can be shown to the user only when captcha-like security measures are required

See also SessionData::UiPolicy()

Macro Documentation

SIGNON_SESSION_DECLARE_PROPERTY(type_, name_)

A macro to create declarations for parameter setter and getter: setname_() and name_(), for a property of type type_. This supports the same types as QVariant. For user specified types see QMetaType.

SSO_ACCESS_CONTROL_TOKENS

Property which holds the access control tokens that the requesting application has.

Note: To be used by the plugins developers only.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.