Commit Graph

102 Commits

Author SHA1 Message Date
Nuno Maduro 55af5469c3
[10.x] Uses PHP Native Type Declarations 🐘 (#6010)
* Adds basic typing around method's arguments and return types

* Adds missing `closure` type

* Adds typing on tests

* Fixes `RedirectIfAuthenticated`

* Fixes `Authenticate`

* Improves `RedirectIfAuthenticated` types

* Fixes user factory `unverified` return type
2023-01-03 10:35:24 +01:00
Taylor Otwell e2e25f607a use except 2022-08-20 12:46:21 -05:00
Taylor Otwell 858a3ca662 wip 2022-08-15 10:21:08 -05:00
Taylor Otwell 951c9c8501 wip 2022-08-15 10:20:30 -05:00
Stephen Rees-Carter dbced6ac8c
Add ValidateSignature middleware for ignore params (#5942)
* Add ValidateSignature middleware for ignore params

* Comment out query parameters by default

* Remove leading slash

* Update Kernel ValidateSignature middleware path
2022-08-15 10:19:56 -05:00
Nuno Maduro 8a62ca2633
Improves generic types on the skeleton (#5740) 2021-12-03 09:04:57 -06:00
Bram 7bf32280e2
[8.x] Add types to arrays in boilerplate (#5738)
* Add more specific types

* Update Authenticate.php

* Update Authenticate.php
2021-12-02 14:40:24 -06:00
Gabriel Pillet 8677c94a50
Fixing "Line exceeds 120 characters" in TrustProxies (#5677)
To comply with PSR-2
2021-08-23 08:42:15 -05:00
Dries Vints b6f4ee7661
Use new TrustProxies middleware (#5662) 2021-08-10 08:41:29 -05:00
Rodrigo Pedra Brum 03be0afb44
Don't trim `current_password` (#5546)
Inspired by https://github.com/laravel/framework/pull/36415

As JetStream/Fortify uses a `current_password` field when allowing a user to change their password, and as JetStream is one of the starter kits listed on the docs, this PR adds `current_password` in the `$except` option of the `TrimStrings` middleware.
2021-03-01 07:38:37 -06:00
Dries Vints f97e551071
Update TrustProxies.php (#5514) 2021-01-12 11:18:35 -06:00
Andrew Brown 38bc9119eb
type hint the middleware Request (#5438)
stemming from https://github.com/laravel/framework/pull/34224
2020-10-02 08:31:13 -05:00
Can Vural 94e7945517
Fix docblock for variadic parameter (#5401) 2020-09-09 07:20:20 -05:00
Mark van den Broek 7895cd3a5f
Update docblock (#5392) 2020-09-04 21:07:55 -05:00
Taylor Otwell e471dd1cf0 rename class 2020-07-14 15:57:11 -05:00
Taylor Otwell e265156bc6 simplify line 2020-07-14 15:12:37 -05:00
Muah adb7eacf9e
[8.x] Multiple guards for RedirectIfAuthenticated (#5329)
* Update RedirectIfAuthenticated.php

allow the middleware to have the same behavior as https://laravel.com/api/5.8/Illuminate/Auth/Middleware/Authenticate.html#method_authenticate

so now the guest middleware have the same footprint as auth ex.`guest:web,admin` instead of creating multiple lines to support different guards.

* Update RedirectIfAuthenticated.php
2020-06-29 10:21:36 -05:00
Taylor Otwell e0c4fd8b8a one line 2020-06-24 11:36:13 -05:00
Taylor Otwell 5639581ea5 add basic trust host middleware 2020-05-18 16:50:22 -05:00
feek 7d62f500a7
chore: update typehint to be nullable (#5296)
By default, this property is null. Therefore, it should be marked as nullable
2020-05-04 08:31:39 -05:00
Taylor Otwell 0bec06cd45 formatting 2019-12-27 08:56:53 -06:00
Barry vd. Heuvel c222f6d04f CS 2019-12-26 19:54:10 +01:00
Barry vd. Heuvel 860ec9f2a4 Use config instead of middleware property 2019-12-26 19:46:41 +01:00
Barry vd. Heuvel bee0e8c94c Add HandleCors middleware 2019-12-24 22:28:20 +01:00
Taylor Otwell 3ee0065bcd remove unnecessary variable 2019-12-20 14:10:38 -06:00
Can Vural 40f93daa83
Update redirectTo return type PHPDoc 2019-12-14 11:48:14 +01:00
Taylor Otwell 972f3cd283
DRY up path (#5173) 2019-12-10 08:59:27 -06:00
Dries Vints e656932002 Apply fixes from StyleCI (#5100) 2019-09-10 17:26:00 +02:00
Matt Hanley f8e455e358 Fix type hint for case of trusting all proxies (string) (#5025) 2019-05-14 07:28:37 -06:00
Taylor Otwell 44d274174f
Revert "[5.8] Modify RedirectIfAuthenticated middleware to accept multiple guards" 2019-02-24 18:51:07 -06:00
Taylor Otwell 247f7f9619
Update RedirectIfAuthenticated.php 2019-01-16 09:05:51 -06:00
Te7a-Houdini bb79dda1ff Modify RedirectIfAuthenticated middleware to accept multiple guards 2019-01-14 17:47:22 +02:00
Dries Vints 6f3aa7a4c5
Don't redirect for api calls
When calling api routes the Authenticate middleware attempts to redirect you to the login page. If you expect JSON back or don't have auth routes then you don't want this to happen. By re-using the logic from Laravel's exception handler on which format to output we can also determine wether to redirect the user to the login page or give them a JSON error response.
2018-10-12 15:40:15 +02:00
Taylor Otwell bf9836a785 Merge branch 'master' into develop 2018-07-19 07:48:44 -05:00
Tobias 6bd50e79a9 Adding boilerplate maintenance middleware with excepted URIs array 2018-07-12 01:13:44 +02:00
Taylor Otwell b65c8245f7 formatting 2018-07-03 09:39:43 -05:00
Barry vd. Heuvel 76af90b50c
Add addHttpCookie to VerifyCsrfToken 2018-07-03 16:37:01 +02:00
Viktor Szépe 2683de7082
Request::HEADER_X_FORWARDED_ALL is an int
=30
2018-04-06 20:15:18 +02:00
Viktor Szépe 20b9daa8f3
Request::HEADER_X_FORWARDED_ALL is an integer
it is int(30)
2018-04-06 20:13:20 +02:00
Taylor Otwell a14e62325c customizable redirect on auth failure 2018-03-13 16:09:47 -05:00
Taylor Otwell 260a8ab2d0 wording 2017-12-19 08:21:38 -06:00
Chris Fidao e823795325 using correct header to use "ALL" x-forwarded-* headers 2017-12-19 06:52:00 -06:00
Chris Fidao 6779a2759e Trusted proxy to version 4.0 for laravel 5.6 2017-12-19 06:48:46 -06:00
Brian Retterer c9e47da895
Changes header keys for TrustProxies to non deprecated version 2017-06-28 17:52:56 -04:00
Taylor Otwell 33c4cab6b7 adjust wording 2017-03-29 10:06:39 -05:00
Taylor Otwell e23a1d284f add trust proxy middleware 2017-03-29 10:05:16 -05:00
Taylor Otwell 54c5e1585a Trim and convert strings to nulls. 2017-01-17 15:35:36 -06:00
Taylor Otwell 24766d479d redirect to home if authed 2016-07-23 15:39:33 -05:00
Joseph Silber 945052508f Use the Authenticate middleware from core 2016-05-26 13:07:11 -04:00
Joseph Silber 6dfc0229b2 Make the Authenticate middleware throw an AuthenticationException 2016-05-22 14:50:39 -04:00