create-prisma-php-app 1.16.32 → 1.16.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/Lib/Auth/AuthConfig.php +25 -15
- package/package.json +1 -1
|
@@ -19,25 +19,35 @@ class AuthConfig
|
|
|
19
19
|
public const IS_ROLE_BASE = false;
|
|
20
20
|
public const IS_TOKEN_AUTO_REFRESH = false;
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* An array listing the public routes that do not require authentication.
|
|
24
|
+
* Routes should be listed as string paths.
|
|
25
|
+
* By default, all routes are public.
|
|
26
|
+
* Example: public static $publicRoutes = ['/']; // This means the home page and others are public and do not require authentication.
|
|
27
|
+
* NOTE: This $publicRoutes = ['/']; is the default setting and does not need to be modified.
|
|
28
|
+
*/
|
|
24
29
|
public static $publicRoutes = ['/'];
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
/**
|
|
32
|
+
* An array of private routes that are accessible to all authenticated users
|
|
33
|
+
* without specific role-based access control. Routes should be listed as string paths.
|
|
34
|
+
* Example: public static $privateRoutes = ['/']; // This makes the home page private
|
|
35
|
+
* Example: public static $privateRoutes = ['profile', 'dashboard/settings']; // These routes are private
|
|
36
|
+
*/
|
|
29
37
|
public static $privateRoutes = [];
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* An associative array mapping specific routes to required user roles for access control.
|
|
41
|
+
* Each route is a key with an array of roles that are allowed access.
|
|
42
|
+
* Format:
|
|
43
|
+
* 'route_path' => [self::ROLE_IDENTIFIER => [AuthRole::Role1, AuthRole::Role2, ...]],
|
|
44
|
+
* Example:
|
|
45
|
+
* public static $roleBasedRoutes = [
|
|
46
|
+
* 'dashboard' => [self::ROLE_IDENTIFIER => [AuthRole::Admin, AuthRole::User]],
|
|
47
|
+
* 'dashboard/users' => [self::ROLE_IDENTIFIER => [AuthRole::Admin]],
|
|
48
|
+
* 'sales' => [self::ROLE_IDENTIFIER => [AuthRole::Admin, AuthRole::User]]
|
|
49
|
+
* ];
|
|
50
|
+
*/
|
|
41
51
|
public static $roleBasedRoutes = [];
|
|
42
52
|
|
|
43
53
|
/**
|