This repository was archived by the owner on Jan 5, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +93
-27
lines changed
Expand file tree Collapse file tree 9 files changed +93
-27
lines changed Original file line number Diff line number Diff line change 1111use Modulus \Utility \Notification ;
1212use Modulus \Framework \Auth \RedirectsUsers ;
1313use Modulus \Framework \Auth \Notifications \MustLogin ;
14- use Modulus \Framework \Auth \Requests \EmailLoginRequest ;
1514
1615trait MustAuthenticateUser
1716{
@@ -73,12 +72,17 @@ public function showMagicLinkPage()
7372 /**
7473 * Login with rmail
7574 *
76- * @param EmailLoginRequest $request
75+ * @param Request $request
7776 * @return void
7877 */
79- public function loginWithEmail (EmailLoginRequest $ request )
78+ public function loginWithEmail (Request $ request )
8079 {
80+ $ request ->rules = [
81+ 'email ' => 'required '
82+ ];
83+
8184 $ request ->validate ();
85+
8286 $ provider = $ this ->provider ;
8387
8488 $ info = MagicLink::notify ($ request , $ provider , $ this ->musk ());
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11MIT License
22
3- Copyright (c) 2018 Donald Pakkies
3+ Copyright (c) 2019 Donald Pakkies
44
55Permission is hereby granted, free of charge, to any person obtaining a copy
66of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ class Load
1313 * Load plugins
1414 *
1515 * @param bool $isConsole
16+ * @param bool $start
17+ * @param mixed $response
1618 * @return void
1719 */
18- public static function plugins (bool $ isConsole )
20+ public static function plugins (bool $ isConsole, bool $ start = true , $ response = null )
1921 {
2022 $ plugins = config ('app.plugins ' );
2123
@@ -39,8 +41,14 @@ public static function plugins(bool $isConsole)
3941
4042 if (!Validate::check ($ extension , $ class_info )) return ;
4143
42- $ extension ->instance ($ extendable , $ DIR );
43- $ extension ->boot ($ extendable );
44+ if ($ start ) {
45+ $ extension ->instance ($ extendable , $ DIR );
46+ $ extension ->boot ($ extendable );
47+ } else {
48+ if ($ extension ->exit ($ response )) {
49+ continue ;
50+ }
51+ }
4452 }
4553 }
4654 }
Original file line number Diff line number Diff line change 11# Modulus Core
22
3- This package is the core component of Modulus.
3+ This package is the core component of Modulus.
4+
5+ Install
6+ -------
7+
8+ This package is automatically installed with the Modulus Framework.
9+
10+ ```
11+ composer require modulusphp/framework
12+ ```
13+
14+ Security
15+ -------
16+
17+ If you discover any security related issues, please email donaldpakkies@gmail.com instead of using the issue tracker.
18+
19+ License
20+ -------
21+
22+ The MIT License (MIT). Please see [ License File] ( LICENSE ) for more information.
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ public static function make(Upstart $app)
2121 */
2222 $ response = $ app ->getResponse ();
2323
24+ /**
25+ * Convert to array
26+ */
27+ if (method_exists ($ response , 'toArray ' )) {
28+ $ response = $ response ->toArray ();
29+ }
30+
2431 /**
2532 * Create a rest response
2633 */
Original file line number Diff line number Diff line change @@ -39,6 +39,13 @@ class Upstart
3939 */
4040 protected $ request ;
4141
42+ /**
43+ * $service
44+ *
45+ * @var \App\Resolvers\AppServiceResolver
46+ */
47+ protected $ service ;
48+
4249 /**
4350 * $response
4451 *
@@ -113,10 +120,15 @@ class_alias($class, $alias);
113120 */
114121 private function startApp (bool $ isConsole )
115122 {
123+ /**
124+ * Create a new instance of the service resolver
125+ */
126+ $ this ->service = new AppServiceResolver ;
127+
116128 /**
117129 * Start the App Service Resolver
118130 */
119- ( new AppServiceResolver ) ->start (Application::prototype ($ isConsole ));
131+ $ this -> service ->start (Application::prototype ($ isConsole ));
120132
121133 /**
122134 * Load framework plugins
@@ -141,6 +153,17 @@ private function startRouter(bool $isConsole)
141153 $ this ->route ($ isConsole );
142154 }
143155
156+ /**
157+ * Undocumented function
158+ *
159+ * @param mixed $response
160+ * @return bool
161+ */
162+ public function parseResponse ($ response ) : bool
163+ {
164+ return $ this ->service ->onExit ($ response );
165+ }
166+
144167 /**
145168 * Set application request
146169 *
Original file line number Diff line number Diff line change @@ -46,4 +46,26 @@ public function start(?array $args = null)
4646
4747 $ this ->boot ($ extendable );
4848 }
49+
50+ /**
51+ * Handle on exit response
52+ *
53+ * @param mixed $response
54+ * @return bool
55+ */
56+ public function onExit ($ response ) : bool
57+ {
58+ return $ this ->exit ($ response );
59+ }
60+
61+ /**
62+ * Handle application response on exit
63+ *
64+ * @param mixed $response
65+ * @return bool
66+ */
67+ protected function exit ($ response ) : bool
68+ {
69+ return false ;
70+ }
4971}
Original file line number Diff line number Diff line change 11{
22 "name" : " modulusphp/framework" ,
33 "description" : " Framework component for Modulus" ,
4- "version" : " 1.9.9.3 " ,
4+ "version" : " 1.9.9.4 " ,
55 "license" : " MIT" ,
66 "type" : " package" ,
77 "authors" : [{
You can’t perform that action at this time.
0 commit comments