This file is indexed.

/usr/include/signon-qt5/SignOn/authservice.h is in libsignon-qt5-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
/*
 * 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 AUTHSERVICE_H
#define AUTHSERVICE_H

#include <QObject>
#include <QStringList>
#include <QMap>

#include "libsignoncommon.h"
#include "identityinfo.h"
#include "signonerror.h"

namespace SignOn {

/*!
 * @class AuthService
 * @headerfile authservice.h SignOn/AuthService
 *
 * Represents signon for client application.
 * The class is for managing identities.
 * Most applications can use this by using widgets from libSignOnUI.
 */
class SIGNON_EXPORT AuthService: public QObject
{
    Q_OBJECT
    Q_DISABLE_COPY(AuthService)

    friend class AuthServiceImpl;

public:
    /*!
     * @enum ServiceError
     * Codes for errors that may be reported by AuthService objects.
     * @deprecated This enum is deprecated. Replaced by Error::ErrorType.
     */
    enum ServiceError {
        UnknownError = 1,               /**< Catch-all for errors not distinguished by another code. */
        InternalServerError = 2,        /**< Signon Daemon internal error. */
        InternalCommunicationError = 3, /**< Communication with Signon Daemon error. */
        PermissionDeniedError = 4,      /**< The operation cannot be performed due to insufficient client permissions. */
        AuthServiceErr = 100,           /* Placeholder to rearrange enumeration */
        MethodNotKnownError,            /**< The method with this name is not found. */
        NotAvailableError,              /**< The service is temporarily unavailable. */
        InvalidQueryError               /**< Parameters for the query are invalid. */
    };

    /*!
     * @enum IdentityFilterCriteria
     * Criterias for idetity query filtering.
     * @see AuthService::queryIdentities()
     */
    typedef enum {
        AuthMethod = 0,
        Username,
        Realm,
        Caption
    } IdentityFilterCriteria;

    /*!
     * @class IdentityRegExp
     * The class represents a regular expression.
     * It is used for filtering identity querying.
     * @see queryIdentities()
     * @note This is for internal use only.
     */
    class IdentityRegExp
    {
    public:
        /*!
         * Constructor creates an IdentityRegExp, as a specified by pattern.
         * @param pattern The regular expression as a string
         */
        IdentityRegExp(const QString &pattern);

        /*!
         * Copy constructor, creates a copy of src.
         * @param src The IdentityRegExp to be copied
         */
        IdentityRegExp(const IdentityRegExp &src);

        /*!
         * Returns the validity of regular expression.
         * @return Always false, validity check not implemented.
         */
        bool isValid() const;

        /*!
         * Returns the pattern of regular expression as string.
         * @return The pattern of this regular expression as string.
         */
        QString pattern() const;

    private:
        QString m_pattern;
    };

public:
    /*!
     * @typedef IdentityFilter
     * Map to hold different filtering options.
     */
    typedef QMap<IdentityFilterCriteria, IdentityRegExp> IdentityFilter;

    /*!
     * Basic constructor
     * @param parent Parent object
     */
    AuthService(QObject *parent = 0);

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

    /*!
     * Requests the information on available authentication methods.
     * The list of service types retrieved
     * is emitted with signal methodsAvailable().
     * Error is reported by emitting signal error().
     *
     * @see AuthService::methodsAvailable()
     * @see AuthService::error()
     */
    void queryMethods();

    /*!
     * Requests the information on mechanisms which are available
     * for certain authentication type.
     * The list of mechanisms retrieved from the service
     * is emitted with signal mechanismsAvailable().
     * Error is reported by emitting signal error().
     * If method is not a valid method, Error::type() is
     * Error::MethodNotKnown.
     *
     * @see AuthService::mechanismsAvailable()
     * @see AuthService::error()
     * @param method authetication method name
     */
    void queryMechanisms(const QString &method);

    /*!
     * Requests information on identities which are stored.
     * The list of identities retrieved from the service
     * is emitted with signal identities().
     * Error is reported by emitting signal error().
     * If filter is not valid, Error::type() is
     * Error::InvalidQuery.
     * If the application does not have keychain-access credential,
     * Error::type() is Error::PermissionDenied.
     *
     * @see AuthService::identities()
     * @see AuthService::error()
     * @param filter Shows only identities specified in filter - filtering not implemented for the moment.
     * If default parameter is passed, all the identities are returned.
     * @credential keychain-access key-chain application can access list of identities.
     */
    void queryIdentities(const IdentityFilter &filter = IdentityFilter());

    /*!
     * Clears credentials database. All identity entries are removed from database.
     * Signal cleared() is emitted when operation is completed.
     * Error is reported by emitting signal error().
     * If the application does not have keychain-access credential,
     * Error::type() is Error::PermissionDenied.
     *
     * @see AuthService::cleared()
     * @see AuthService::error()
     * @credential keychain-access key-chain application can clear database.
     */
    void clear();

Q_SIGNALS:

    /*!
     * Emitted when an error occurs while using the AuthService.
     * Typical error types are generic errors, where
     * Error::type() < Error::AuthServiceErr and
     * AuthService specific, where
     * Error::AuthServiceErr < Error::type() < Error::IdentityErr
     * @see SignOn::Error
     * @see SignOn::Error::ErrorType
     * @param err The error object
     */
    void error(const SignOn::Error &err);

    /*!
     * Emitted when the list of available authentication methods have been obtained
     * from the service.
     *
     * @param methods List of available authentication method names
     */
    void methodsAvailable(const QStringList &methods);

    /*!
     * Emitted when the list of available mechanisms have been obtained
     * from the service.
     *
     * @param method Name of authentication method that was queried
     * @param mechanisms List of available mechanisms
     */
    void mechanismsAvailable(const QString &method, const QStringList &mechanisms);

    /*!
     * Lists identities available on the server matching query parameters.
     * This signal is emitted in response to queryIdentities().
     *
     * @param identityList list of identities information
     */
    void identities(const QList<SignOn::IdentityInfo> &identityList);

    /*!
     * Database is cleared and reset to initial state.
     * This signal is emitted in response to clear().
     */
    void cleared();

private:
    class AuthServiceImpl *impl;
};

} // namespace SignOn

#endif // AUTHSERVICE_H