This file is indexed.

/usr/include/signon-qt/SignOn/identityinfo.h is in libsignon-qt-dev 8.56+14.04.20140307-0ubuntu2.

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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
/*
 * This file is part of signon
 *
 * Copyright (C) 2009-2010 Nokia Corporation.
 *
 * Contact: Aurel Popirtac <ext-aurel.popirtac@nokia.com>
 * 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 IDENTITY_INFO_H
#define IDENTITY_INFO_H

#include <QStringList>
#include <QMetaType>

#include "libsignoncommon.h"

namespace SignOn {

/*!
 * @typedef QString MethodName
 * Defines a string as an authentication method.
 */
typedef QString MethodName;

/*!
 * @typedef QStringList MechanismsList
 * Defines a string list as a list of mechanisms.
 */
typedef QStringList MechanismsList;

/*!
 * @class IdentityInfo
 * @headerfile identityinfo.h SignOn/IdentityInfo
 *
 * Contains identity information. This information is stored into database.
 * @see queryIdentities()
 */
class SIGNON_EXPORT IdentityInfo
{
    friend class AuthServiceImpl;
    friend class IdentityImpl;

public:
    /*!
     * @enum CredentialsType
     * Values used to describe the type of the identity
     * @attention Mixed types, i.e Application|Web are not yet supported. Just
     * single types work for the time being.
     */
    enum CredentialsType {
        Other = 0,
        Application = 1 << 0,
        Web = 1 << 1,
        Network = 1 << 2
    };

public:
    /*!
     * Creates a new empty IdentityInfo object.
     */
    IdentityInfo();

    /*!
     * Copy constructor
     */
    IdentityInfo(const IdentityInfo &other);

    /*!
     * Assignment operator
     */
    IdentityInfo &operator=(const IdentityInfo &other);

    /*!
     * Creates a new IdentityInfo object with given values.
     * @param caption Description of identity
     * @param userName Username
     * @param methods Allowed methods for identity
     */
    IdentityInfo(const QString &caption, const QString &userName,
                 const QMap<MethodName,MechanismsList> &methods);

    /*!
     * Destructor
     */
    ~IdentityInfo();

    /*!
     * Sets the numeric identifier for the credentials record.
     * Calling this method makes only sense when handling the
     * Identity::credentialsStored() signal.
     * @param id The numeric identifier of the credentials.
     */
    void setId(const quint32 id);

    /*!
      * Returns the identity identifier.
      * @return Identifier for the identity
      */
    quint32 id() const;

    /*!
     * Sets the secret. When performing a challenge on the owner Identity object,
     * if the secret is set on its corresponding IdentityInfo, it will be added
     * to the parameter list that is passed to the corresponding authentication
     * plugin challenge implementation. By default a newly created IdentityInfo
     * does not contain a secret and has a policy of not storing any. If the
     * secret is set the default policy will be to store it. This behaviour can
     * also be set with IdentityInfo::setStoreSecret().
     *
     * @see PluginInterface::secretKey
     * @see PluginInterface::challenge
     * @param secret
     * @param storeSecret Whether the secret is stored or not
     */
    void setSecret(const QString &secret, const bool storeSecret = true);

    /*!
     * Gets the secret. If this object was retrieved from the database, the
     * returned secret might be an empty string.
     * @return The secret, when allowed, or an empty string.
     */
    QString secret() const;

    /*!
     * Returns whether secret is to be stored.
     * @return true Whether the secret is being stored or not.
     */
    bool isStoringSecret() const;

    /*!
     * Sets whether the secret is stored or not.
     * @param storeSecret Whether the secret must be stored in the DB.
     */
    void setStoreSecret(const bool storeSecret);

    /*!
     * Sets the username.
     *
     * @see userNameKey
     * @param userName Username
     */
    void setUserName(const QString &userName);

    /*!
     * Returns the username.
     * @return Username for the identity
     */
    const QString userName() const;

    /*!
     * Sets a human readable caption of the identity
     * @param caption Caption
     */
    void setCaption(const QString &caption);

    /*!
     * Returns a human-readable representation of the identity.
     * @return Human-readable representation of the identity.
     */
    const QString caption() const;

    /*!
     * Sets the realms, e.g. URL's with which the Identity using this
     * IdentityInfo shall work with.
     *
     * @param realms List of the realms to be set.
     */
    void setRealms(const QStringList &realms);

    /*!
     * Gets the realms, e.g. URL's with which the Identity using this
     * IdentityInfo works with.
     *
     * @return List of supported realms.
     */
    QStringList realms() const;

    /*!
     * Sets application token that owns identity, therefore defining the
     * applications that will be able to modify this specific set of credentials
     *
     * @param ownerToken owner token
     */
    void setOwner(const QString &ownerToken);

    /*!
     * Gets the owner application token that is defining the applications
     * that are able to modify this specific set of credentials.
     *
     * @attention This is accessible only to the owner application.
     *
     * @return The access control token which defines the applications
     * allowed to modify this set of credentials.
     */
    QString owner() const;

    /*!
     * Sets the list of access control application tokens, therefore
     * defining the applications that will be able to access this specific
     * set of credentials.
     *
     * @param accessControlList List of access control tokens
     */
    void setAccessControlList(const QStringList &accessControlList);

    /*!
     * Gets the list of access control application tokens defining the
     * applications that are able to access this specific set of credentials.
     *
     * @attention This is accessible only to the owner application.
     *
     * @return The access control tokens which defines the applications allowed
     * to access this set of credentials.
     */
    QStringList accessControlList() const;

    /*!
     * Sets the method into identity info.
     * If the given method is not included, a new one will be added. If it is
     * already set, the mechanism list assosiated to it is updated. an empty
     * list will clear the mechanisms.
     * These values are used to limit Identity to use the specified methods and
     * mechanisms.
     * @param method Method name to change
     * @param mechanismsList list of mechanisms that are allowed
     */
    void setMethod(const MethodName &method,
                   const MechanismsList &mechanismsList);

    /*!
     * Removes a method from identity info.
     * @param method Method name to remove
     */
    void removeMethod(const MethodName &method);

    /*!
     * Sets the type into identity info.
     * The type is used to generically identify where this identity is being
     * used.
     *
     * @attention If this method is not called, the IdentityInfo type will
     * default to SignOn::OtherIdentity.
     *
     * @param type Type we want to assign to this IdentityInfo
     */
    void setType(CredentialsType type);

    /*!
     * Retrieves the identity type from identity info.
     * @return The identity type for this IdentityInfo
     */
    CredentialsType type() const;

    /*!
     * Lists all methods in identity info.
     * @return Param method method name to remove.
     */
    QList<MethodName> methods() const;

    /*!
     * Lists the all mechanisms for certain method in identity info.
     * @param method Method name to list mechanisms
     * @return List of mechanisms
     */
    MechanismsList mechanisms(const MethodName &method) const;

    /*!
     * Sets the refcount into identity info.
     * The type is used to generically identify where this identity is being
     * used.
     *
     * @note Server can restrict changes to differ +-1 from previous.
     *
     * @param refCount Set refcount
     */
    void setRefCount(qint32 refCount);

    /*!
     * Retrieves the refcount from identity info.
     * @return Refcount for this IdentityInfo
     */
    qint32 refCount() const;

private:
    class IdentityInfoImpl *impl;
};

}  // namespace SignOn

Q_DECLARE_METATYPE(SignOn::IdentityInfo)

#endif /* IDENTITY_INFO_H */