GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 6f8b1f...142a48 )
by James
25:51 queued 11:45
created

app/Http/Kernel.php (2 issues)

Labels
Severity
1
<?php
2
/**
3
 * Kernel.php
4
 * Copyright (c) 2017 [email protected]
5
 *
6
 * This file is part of Firefly III.
7
 *
8
 * Firefly III is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation, either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * Firefly III is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
20
 */
21
declare(strict_types=1);
22
23
namespace FireflyIII\Http;
24
25
use FireflyIII\Http\Middleware\Authenticate;
26
use FireflyIII\Http\Middleware\AuthenticateTwoFactor;
0 ignored issues
show
The type FireflyIII\Http\Middleware\AuthenticateTwoFactor was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
27
use FireflyIII\Http\Middleware\Binder;
28
use FireflyIII\Http\Middleware\EncryptCookies;
29
use FireflyIII\Http\Middleware\Installer;
30
use FireflyIII\Http\Middleware\InterestingMessage;
31
use FireflyIII\Http\Middleware\IsAdmin;
32
use FireflyIII\Http\Middleware\Range;
33
use FireflyIII\Http\Middleware\RedirectIfAuthenticated;
34
use FireflyIII\Http\Middleware\RedirectIfTwoFactorAuthenticated;
0 ignored issues
show
The type FireflyIII\Http\Middlewa...fTwoFactorAuthenticated was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
35
use FireflyIII\Http\Middleware\Sandstorm;
36
use FireflyIII\Http\Middleware\SecureHeaders;
37
use FireflyIII\Http\Middleware\StartFireflySession;
38
use FireflyIII\Http\Middleware\TrimStrings;
39
use FireflyIII\Http\Middleware\TrustProxies;
40
use FireflyIII\Http\Middleware\VerifyCsrfToken;
41
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
42
use Illuminate\Auth\Middleware\Authorize;
43
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
44
use Illuminate\Foundation\Http\Kernel as HttpKernel;
45
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
46
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
47
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
48
use Illuminate\Routing\Middleware\ThrottleRequests;
49
use Illuminate\View\Middleware\ShareErrorsFromSession;
50
use Laravel\Passport\Http\Middleware\CreateFreshApiToken;
51
use PragmaRX\Google2FALaravel\Middleware as MFAMiddleware;
52
53
/**
54
 * Class Kernel
55
 *
56
 * @codeCoverageIgnore
57
 */
58
class Kernel extends HttpKernel
59
{
60
    /**
61
     * The application's global HTTP middleware stack.
62
     *
63
     * These middleware are run during every request to your application.
64
     *
65
     * @var array
66
     */
67
    protected $middleware
68
        = [
69
            SecureHeaders::class,
70
            CheckForMaintenanceMode::class,
71
            ValidatePostSize::class,
72
            TrimStrings::class,
73
            ConvertEmptyStringsToNull::class,
74
            TrustProxies::class,
75
        ];
76
77
    /**
78
     * The application's route middleware groups.
79
     *
80
     * @var array
81
     */
82
    protected $middlewareGroups
83
        = [
84
            // does not check login
85
            // does not check 2fa
86
            // does not check activation
87
            'web'                   => [
88
                Sandstorm::class,
89
                EncryptCookies::class,
90
                AddQueuedCookiesToResponse::class,
91
                StartFireflySession::class,
92
                ShareErrorsFromSession::class,
93
                VerifyCsrfToken::class,
94
                CreateFreshApiToken::class,
95
            ],
96
97
            // only the basic variable binders.
98
            'binders-only'          => [
99
                Installer::class,
100
                EncryptCookies::class,
101
                AddQueuedCookiesToResponse::class,
102
                Binder::class,
103
            ],
104
105
            // MUST NOT be logged in. Does not care about 2FA or confirmation.
106
            'user-not-logged-in'    => [
107
                Installer::class,
108
                Sandstorm::class,
109
                EncryptCookies::class,
110
                AddQueuedCookiesToResponse::class,
111
                StartFireflySession::class,
112
                ShareErrorsFromSession::class,
113
                VerifyCsrfToken::class,
114
                Binder::class,
115
                RedirectIfAuthenticated::class,
116
            ],
117
            // MUST be logged in.
118
            // MUST NOT have 2FA
119
            // don't care about confirmation:
120
            'user-logged-in-no-2fa' => [
121
                Installer::class,
122
                Sandstorm::class,
123
                EncryptCookies::class,
124
                AddQueuedCookiesToResponse::class,
125
                StartFireflySession::class,
126
                ShareErrorsFromSession::class,
127
                VerifyCsrfToken::class,
128
                Binder::class,
129
                Authenticate::class,
130
                //RedirectIfTwoFactorAuthenticated::class,
131
            ],
132
133
            // MUST be logged in
134
            // don't care about 2fa
135
            // don't care about confirmation.
136
            'user-simple-auth'      => [
137
                Sandstorm::class,
138
                EncryptCookies::class,
139
                AddQueuedCookiesToResponse::class,
140
                StartFireflySession::class,
141
                ShareErrorsFromSession::class,
142
                VerifyCsrfToken::class,
143
                Binder::class,
144
                Authenticate::class,
145
            ],
146
147
            // MUST be logged in
148
            // MUST have 2fa
149
            // MUST be confirmed.
150
            // (this group includes the other Firefly middleware)
151
            'user-full-auth'        => [
152
                Sandstorm::class,
153
                EncryptCookies::class,
154
                AddQueuedCookiesToResponse::class,
155
                StartFireflySession::class,
156
                ShareErrorsFromSession::class,
157
                VerifyCsrfToken::class,
158
                Authenticate::class,
159
                MFAMiddleware::class,
160
                Range::class,
161
                Binder::class,
162
                CreateFreshApiToken::class,
163
                InterestingMessage::class,
164
            ],
165
            // MUST be logged in
166
            // MUST have 2fa
167
            // MUST be confirmed.
168
            // MUST have owner role
169
            // (this group includes the other Firefly middleware)
170
            'admin'                 => [
171
                Sandstorm::class,
172
                EncryptCookies::class,
173
                AddQueuedCookiesToResponse::class,
174
                StartFireflySession::class,
175
                ShareErrorsFromSession::class,
176
                VerifyCsrfToken::class,
177
                Authenticate::class,
178
                //AuthenticateTwoFactor::class,
179
                IsAdmin::class,
180
                Range::class,
181
                Binder::class,
182
                CreateFreshApiToken::class,
183
            ],
184
185
            'api' => [
186
                'throttle:60,1',
187
                'bindings',
188
            ],
189
        ];
190
    /**
191
     * The priority-sorted list of middleware.
192
     *
193
     * This forces non-global middleware to always be in the given order.
194
     *
195
     * @var array
196
     */
197
    protected $middlewarePriority
198
        = [
199
            StartFireflySession::class,
200
            ShareErrorsFromSession::class,
201
            Authenticate::class,
202
            Binder::class,
203
            Authorize::class,
204
        ];
205
    /**
206
     * The application's route middleware.
207
     *
208
     * These middleware may be assigned to groups or used individually.
209
     *
210
     * @var array
211
     */
212
    protected $routeMiddleware
213
        = [
214
            'auth'       => Authenticate::class,
215
            'auth.basic' => AuthenticateWithBasicAuth::class,
216
            'bindings'   => Binder::class,
217
            'can'        => Authorize::class,
218
            'guest'      => RedirectIfAuthenticated::class,
219
            'throttle'   => ThrottleRequests::class,
220
        ];
221
}
222