/usr/include/signon-plugins/SignOn/uisessiondata.h is in signon-plugins-dev 8.59+17.10.20170606-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | /*
* This file is part of signon
*
* Copyright (C) 2009-2010 Nokia Corporation.
* Copyright (C) 2012-2016 Canonical Ltd.
*
* Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
/*!
* @copyright Copyright (C) 2009-2011 Nokia Corporation.
* @license LGPL
*/
#ifndef UISESSIONDATA_H
#define UISESSIONDATA_H
#include <SignOn/SessionData>
/*!
* Error codes for ui interaction.
*/
namespace SignOn {
enum QueryError {
QUERY_ERROR_NONE = 0, /**< No errors. */
QUERY_ERROR_GENERAL, /**< Generic error during interaction. */
QUERY_ERROR_NO_SIGNONUI, /**< Cannot send request to signon-ui. */
QUERY_ERROR_BAD_PARAMETERS, /**< Signon-Ui cannot create dialog based on
the given UiSessionData. */
QUERY_ERROR_CANCELED, /**< User canceled action. Plugin should not
retry automatically after this. */
QUERY_ERROR_NOT_AVAILABLE, /**< Requested ui is not available. For
example browser cannot be started. */
QUERY_ERROR_BAD_URL, /**< Given url was not valid. */
QUERY_ERROR_BAD_CAPTCHA, /**< Given captcha image was not valid. */
QUERY_ERROR_BAD_CAPTCHA_URL, /**< Given url for capctha loading was not
valid. */
QUERY_ERROR_REFRESH_FAILED, /**< Refresh failed. */
QUERY_ERROR_FORBIDDEN, /**< Showing ui forbidden by ui policy. */
QUERY_ERROR_FORGOT_PASSWORD, /**< User pressed forgot password. */
QUERY_ERROR_NETWORK, /**< Network error. */
QUERY_ERROR_SSL, /**< SSL error. */
};
/*!
* Predefined messages to be shown to user while querying input.
*/
enum QueryMessageId {
QUERY_MESSAGE_EMPTY = 0, /**< No predefined message. */
QUERY_MESSAGE_LOGIN, /**< Login without prior errors. */
QUERY_MESSAGE_NOT_AUTHORIZED /**< Authentication failed. */
//TODO add more messages
};
/*!
* @class UiSessionData
* Data container to hold values for authentication session.
* Inherit this class if you want to extend the property range.
*
* @warning All this class' definitions must be inline.
*/
class UiSessionData : public SessionData
{
public:
/*!
* Constructor. Creates a UiSessionData with data 'data'.
* @param data The data to be contained by the UiSessionData
* @attention internal use only recommended. As a SSO client application
* developer use setters/gettters for specific SessionData properties.
*/
UiSessionData(const QVariantMap &data = QVariantMap()) { m_data = data; }
/*!
* Declares the property QueryError setter and getter.
* QueryError is used to report errors in ui interaction
* that is shown to user.
* @see QueryError
*/
SIGNON_SESSION_DECLARE_PROPERTY(int, QueryErrorCode)
/*!
* Declare the property Caption setter and getter.
* Caption is used to set credentials caption.
* Empty caption is discarded.
* @warning This string is shown to user as it is,
* plugin is responsible for localization.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, Caption)
/*!
* Declare the property Title setter and getter.
* Title is used to set dialog title for password confirmation.
* @warning This string is shown to user as it is.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, Title)
/*!
* Declares the property QueryMessageId setter and getter.
* QueryMessageId is used to select predefined localized message
* that is shown to user.
* @see QueryMessageId
*/
SIGNON_SESSION_DECLARE_PROPERTY(int, QueryMessageId)
/*!
* Declares the property QueryMessage setter and getter.
* QueryMessage is used to show given message to user.
* Empty message is discarded.
* @warning This string is shown to user as it is,
* plugin is responsible for localization.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, QueryMessage)
/*!
* Declares the property QueryUserName setter and getter.
* QueryUserName is used to enable username input in signon-ui.
*/
SIGNON_SESSION_DECLARE_PROPERTY(bool, QueryUserName)
/*!
* Declares the property QueryPassword setter and getter.
* QueryPassword is used to enable password input in signon-ui.
*/
SIGNON_SESSION_DECLARE_PROPERTY(bool, QueryPassword)
/*!
* Declares the property RememberPassword setter and getter.
* RememberPassword is used to enable password storing signond.
*/
SIGNON_SESSION_DECLARE_PROPERTY(bool, RememberPassword)
/*!
* Declares the property ShowRealm setter and getter.
* ShowRealm is used to show realm in signon-ui.
*/
SIGNON_SESSION_DECLARE_PROPERTY(bool, ShowRealm)
/*!
* Declares the property OpenUrl setter and getter.
* This url is passed to signon-ui to be opened and shown to user.
* Empty url does not open the url view.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, OpenUrl)
/*!
* Declares the property FinalUrl setter and getter.
* If this URL is set, the signon-ui browser widget will close
* automatically when this URL is reached.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, FinalUrl)
/*!
* Declares the property UrlResponse setter and getter.
* Response from signon-ui for OpenUrl request.
* After completion UrlResponse contains redirect target url, if there was
* redirection.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, UrlResponse)
/*!
* Declares the property CaptchaUrl setter and getter.
* CaptchaUrl contains url to the captcha image to be verified by user.
* CaptchaUrl is used in signon-ui when plugin requires the captcha
* verification from user.
* If this is empty, captcha query is not shown, unless CaptchaImage
* contain valid image.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, CaptchaUrl)
/*!
* Declares the property CaptchaImage setter and getter.
* CaptchaImage contains the captcha image to be verified by user.
* CaptchaImage is passed to signon-ui when plugin requires the captcha
* verification from user.
* If this is empty, captcha query is not shown, unless CaptchaUrl point to
* valid image.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QByteArray, CaptchaImage)
/*!
* Declares the property CaptchaResponse setter and getter
* CaptchaResponse is passed to plugin after signon-ui has processed the
* captcha query.
* It contains user input for captcha query.
* @see CaptchaUrl
* @see CaptchaImage.
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, CaptchaResponse)
/*!
* Declares the property ForgotPassword setter and getter
* ForgotPassword string is shown as a link to user.
* @see ForgotPasswordUrl
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, ForgotPassword)
/*!
* Declares the property ForgotPasswordUrl setter and getter
* ForgotPasswordUrl is shown to user if ForgotPassword link is pressed.
* @see ForgotPassword
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, ForgotPasswordUrl)
/*!
* Declares the property Confirm setter and getter
* This will set dialog to confirm password mode.
* @see ForgotPasswordUrl
*/
SIGNON_SESSION_DECLARE_PROPERTY(bool, Confirm)
/*!
* Declares the property Icon setter and getter
* Icon is shown to user in signin dialog.
* @see ForgotPassword
*/
SIGNON_SESSION_DECLARE_PROPERTY(QString, Icon)
};
} //namespace SignOn
Q_DECLARE_METATYPE(SignOn::UiSessionData)
#endif // UISESSIONDATA_H
|