daevin 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Daevin_test/.editorconfig +15 -0
- package/Daevin_test/.env.example +92 -0
- package/Daevin_test/.gitattributes +10 -0
- package/Daevin_test/CODE_OF_CONDUCT.md +3 -0
- package/Daevin_test/CONTRIBUTING.md +3 -0
- package/Daevin_test/LICENSE +21 -0
- package/Daevin_test/README.md +314 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ApiLoginProxyForWebClientAction.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ApiLogoutAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ApiRefreshProxyForWebClientAction.php +47 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ForgotPasswordAction.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/GetAuthenticatedUserAction.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/RegisterUserAction.php +39 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/ResetPasswordAction.php +61 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/SendVerificationEmailAction.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/VerifyEmailAction.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/WebLoginAction.php +46 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Actions/WebLogoutAction.php +17 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Classes/LoginCustomAttribute.php +97 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Configs/appSection-authentication.php +117 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/EmailNotVerifiedException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/InvalidEmailVerificationDataException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/InvalidResetPasswordTokenException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/LoginFailedException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Exceptions/RefreshTokenMissingException.php +12 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Mails/ForgotPassword.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Mails/Templates/forgot-password.blade.php +73 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Middlewares/RedirectIfAuthenticated.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/EmailVerified.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/PasswordReset.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/VerifyEmail.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Notifications/Welcome.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Providers/AuthServiceProvider.php +76 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Providers/MainServiceProvider.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Providers/MiddlewareServiceProvider.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/README.md +1 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/CallOAuthServerTask.php +36 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/CreatePasswordResetTokenTask.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/CreateUserByCredentialsTask.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/LoginTask.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/MakeRefreshCookieTask.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tasks/SendVerificationEmailTask.php +16 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Stubs/oauth-private.key +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Stubs/oauth-public.key +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/TestCase.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/CreatePasswordResetTokenTaskTest.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/CreateUserByCredentialsTaskTest.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/ForgotPasswordActionTest.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/LoginCustomAttributeTest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/RedirectIfAuthenticatedMiddlewareTest.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/RegisterUserActionTest.php +64 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/ResetPasswordActionTest.php +83 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/SendVerificationEmailTaskTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Tests/Unit/WebLoginActionTest.php +75 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/Traits/AuthenticationTrait.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/ForgotPasswordController.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/GetAuthenticatedUserController.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/LoginProxyForWebClientController.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/LogoutController.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/RefreshProxyForWebClientController.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/RegisterUserController.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/ResetPasswordController.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/SendVerificationEmailController.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Controllers/VerifyEmailController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/ForgotPasswordRequest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/GetAuthenticatedUserRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php +57 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/RegisterUserRequest.php +61 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/ResetPasswordRequest.php +55 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/SendVerificationEmailRequest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Requests/VerifyEmailRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/ForgotPassword.v1.public.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/GetAuthenticatedUser.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/LoginProxyForWebClient.v1.public.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingCredentialGrant.v1.public.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/LoginUsingPasswordGrant.v1.private.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/Logout.v1.public.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/RefreshProxyForWebClient.v1.public.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/RegisterUser.v1.private.php +38 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/ResetPassword.v1.public.php +37 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/SendVerificationEmail.v1.public.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Routes/VerifyEmail.v1.public.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/ApiTestCase.php +74 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ApiLoginProxyForWebClientTest.php +129 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ApiLogoutTest.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ApiRefreshProxyForWebClientTest.php +86 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ForgotPasswordTest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/GetAuthenticatedUserTest.php +76 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/RegisterUserTest.php +208 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/ResetPasswordTest.php +79 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/SendVerificationEmailTest.php +95 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/Stubs/oauth-private.key +51 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/Stubs/oauth-public.key +14 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/API/Tests/Functional/VerifyEmailTest.php +84 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LoginController.php +39 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LogoutController.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Requests/LoginRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Requests/LogoutRequest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Routes/GetLogin.v1.public.php +8 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Routes/PostLogin.v1.public.php +8 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Routes/PostLogout.php +7 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/UI/WEB/Views/login.blade.php +121 -0
- package/Daevin_test/app/Containers/AppSection/Authentication/composer.json +11 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/AssignRolesToUserAction.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToRoleAction.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToUserAction.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/CreatePermissionAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/CreateRoleAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/DeleteRoleAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromRoleAction.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromUserAction.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/FindPermissionAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/FindRoleAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetAllPermissionsAction.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetAllRolesAction.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetRolePermissionsAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetUserPermissionsAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/GetUserRolesAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/RevokeRolesFromUserAction.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/SyncPermissionsOnRoleAction.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Actions/SyncUserRolesAction.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Configs/appSection-authorization.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Configs/permission.php +161 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Factories/PermissionFactory.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Factories/RoleFactory.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Migrations/2016_12_29_201047_create_permission_tables.php +141 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122453_add_extra_fields_to_permissions_tale.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122522_add_extra_fields_to_roles_table.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Repositories/PermissionRepository.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Repositories/RoleRepository.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php +36 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationGivePermissionsToRolesSeeder_3.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationPermissionsSeeder_1.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationRolesSeeder_2.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Models/Permission.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Models/Role.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Providers/MainServiceProvider.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/README.md +1 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/AssignRolesToUserTask.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/CreatePermissionTask.php +41 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/CreateRoleTask.php +41 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/DeleteRoleTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromRoleTask.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromUserTask.php +24 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/FindPermissionTask.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/FindRoleTask.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/GetAllPermissionsTask.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/GetAllRolesTask.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tasks/RevokeRoleFromUserTask.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/TestCase.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/CreatePermissionTaskTest.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/CreateRoleTaskTest.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/DeleteRoleTaskTest.php +36 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/FindPermissionTaskTest.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/FindRoleTaskTest.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/PermissionFactoryTest.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/PermissionMigrationTest.php +95 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Tests/Unit/RoleFactoryTest.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Traits/AuthorizationTrait.php +11 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/Traits/IsResourceOwnerTrait.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/AssignRolesToUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToUserController.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/CreateRoleController.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/DeleteRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/FindPermissionController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/FindRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllPermissionsController.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllRolesController.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetRolePermissionsController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetUserPermissionsController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/GetUserRolesController.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/RevokeRolesFromUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncPermissionOnRoleController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncUserRolesController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToUserRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php +47 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromUserRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetRolePermissionsRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetUserPermissionsRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/GetUserRolesRequest.php +51 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/AssignRolesToUser.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToRole.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/AttachPermissionsToUser.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/CreateRole.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/DeleteRole.v1.private.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromRole.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/DetachPermissionsFromUser.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/FindPermission.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/FindRole.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllPermissions.v1.private.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetAllRoles.v1.private.php +21 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetRolePermissions.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetUserPermissions.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/GetUserRoles.v1.private.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/RevokeRolesFromUser.v1.private.php +29 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/SyncPermissionOnRole.v1.private.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/SyncUserRoles.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/_permission.v1.public.php +25 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/_role.v1.public.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Routes/_userPermissions.v1.public.php +48 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/ApiTestCase.php +15 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AssignRolesToUserTest.php +71 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AttachPermissionToUserTest.php +114 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AttachPermissionsToRoleTest.php +115 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/CreateRoleTest.php +65 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DeleteRoleTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DetachPermissionFromUserTest.php +120 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DetachPermissionsFromRoleTest.php +115 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/FindPermissionTest.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/FindRoleTest.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetAllPermissionsTest.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetAllRolesTest.php +32 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetRolePermissionsTest.php +39 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetUserPermissionsTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/GetUserRolesTest.php +40 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/RevokeRolesFromUserTest.php +115 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/SyncPermissionsOnRoleTest.php +92 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/SyncUserRolesTest.php +93 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Transformers/PermissionTransformer.php +28 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/API/Transformers/RoleTransformer.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Controllers/UnauthorizedController.php +19 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Requests/UnauthorizedRequest.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Routes/GetUnauthorized.php +7 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/UI/WEB/Views/unauthorized.blade.php +43 -0
- package/Daevin_test/app/Containers/AppSection/Authorization/composer.json +11 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/CreatePostsAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/DeletePostsAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/FindPostsByIdAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/GetAllPostsAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Actions/UpdatePostsAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Configs/appSection-posts.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Data/Factories/PostsFactory.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Data/Migrations/2023_2_19_55939_create_posts_migration.php +30 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Data/Repositories/PostsRepository.php +17 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Models/Posts.php +42 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Posts.json +7 -0
- package/Daevin_test/app/Containers/AppSection/Posts/README.md +194 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/CreatePostsTask.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/DeletePostsTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/FindPostsByIdTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/GetAllPostsTask.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Posts/Tasks/UpdatePostsTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Controllers/Controller.php +94 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/CreatePostsRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/DeletePostsRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/FindPostsByIdRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/GetAllPostsRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Requests/UpdatePostsRequest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/CreatePostsRoute.v1.private.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/DeletePostsRoute.v1.private.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/FindPostsByIdRoute.v1.private.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/GetAllPostsRoute.v1.private.php +74 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Routes/UpdatePostsRoute.v1.private.php +52 -0
- package/Daevin_test/app/Containers/AppSection/Posts/UI/API/Transformers/PostsTransformer.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Posts/composer.json +7 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/CreateAdminAction.php +39 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/DeleteUserAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/FindUserByIdAction.php +22 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/GetAllUsersAction.php +21 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/UpdateUserAction.php +33 -0
- package/Daevin_test/app/Containers/AppSection/User/Actions/UpdateUserPasswordAction.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Configs/appSection-user.php +5 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Factories/UserFactory.php +44 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000001_create_users_table.php +34 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000002_create_password_resets_table.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Repositories/UserRepository.php +21 -0
- package/Daevin_test/app/Containers/AppSection/User/Data/Seeders/UserPermissionsSeeder_1.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/Models/User.php +58 -0
- package/Daevin_test/app/Containers/AppSection/User/Notifications/PasswordUpdatedNotification.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Providers/MainServiceProvider.php +39 -0
- package/Daevin_test/app/Containers/AppSection/User/README.md +1 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/DeleteUserTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/FindUserByEmailTask.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/FindUserByIdTask.php +31 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/GetAllUsersTask.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/Tasks/UpdateUserTask.php +42 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/TestCase.php +18 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/CreateAdminActionTest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/DeleteUserTaskTest.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/FindUserByIdTaskTest.php +35 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/PasswordResetsMigrationTest.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/UpdateUserTaskTest.php +52 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/UserFactoryTest.php +36 -0
- package/Daevin_test/app/Containers/AppSection/User/Tests/Unit/UsersMigrationTest.php +34 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/DeleteUserController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/FindUserByIdController.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/GetAllUsersController.php +28 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/UpdateUserController.php +30 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Controllers/UpdateUserPasswordController.php +30 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/DeleteUserRequest.php +48 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/GetAllUsersRequest.php +45 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/UpdateUserPasswordRequest.php +56 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Requests/UpdateUserRequest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/DeleteUser.v1.private.php +26 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/FindUserById.v1.private.php +24 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/GetAllUsers.v1.private.php +23 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/UpdateUser.v1.private.php +27 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/UpdateUserPassword.v1.private.php +36 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Routes/_user.v1.public.php +25 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/ApiTestCase.php +15 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/DeleteUserTest.php +50 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/FindUserByIdTest.php +80 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/GetAllUsersTest.php +88 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserPasswordTest.php +126 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Tests/Functional/UpdateUserTest.php +80 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/API/Transformers/UserTransformer.php +52 -0
- package/Daevin_test/app/Containers/AppSection/User/UI/CLI/Commands/CreateAdminCommand.php +37 -0
- package/Daevin_test/app/Containers/AppSection/User/composer.json +7 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/CreateUsersAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/DeleteUsersAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/FindUsersByIdAction.php +18 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/GetAllUsersAction.php +23 -0
- package/Daevin_test/app/Containers/AppSection/Users/Actions/UpdateUsersAction.php +26 -0
- package/Daevin_test/app/Containers/AppSection/Users/Configs/appSection-users.php +14 -0
- package/Daevin_test/app/Containers/AppSection/Users/Data/Factories/UsersFactory.php +22 -0
- package/Daevin_test/app/Containers/AppSection/Users/Data/Migrations/2023_2_19_55939_create_users_migration.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Users/Data/Repositories/UsersRepository.php +17 -0
- package/Daevin_test/app/Containers/AppSection/Users/Models/Users.php +44 -0
- package/Daevin_test/app/Containers/AppSection/Users/README.md +194 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/CreateUsersTask.php +34 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/DeleteUsersTask.php +35 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/FindUsersByIdTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/GetAllUsersTask.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Users/Tasks/UpdateUsersTask.php +33 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Controllers/Controller.php +94 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/CreateUsersRequest.php +55 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/DeleteUsersRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/FindUsersByIdRequest.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/GetAllUsersRequest.php +54 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Requests/UpdateUsersRequest.php +57 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/CreateUsersRoute.v1.private.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/DeleteUsersRoute.v1.private.php +31 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/FindUsersByIdRoute.v1.private.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/GetAllUsersRoute.v1.private.php +75 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Routes/UpdateUsersRoute.v1.private.php +53 -0
- package/Daevin_test/app/Containers/AppSection/Users/UI/API/Transformers/UsersTransformer.php +49 -0
- package/Daevin_test/app/Containers/AppSection/Users/Users.json +7 -0
- package/Daevin_test/app/Containers/AppSection/Users/composer.json +7 -0
- package/Daevin_test/app/Ship/Broadcasts/channels.php +16 -0
- package/Daevin_test/app/Ship/Commands/HelloWorldCommand.php +32 -0
- package/Daevin_test/app/Ship/Commands/closures.php +19 -0
- package/Daevin_test/app/Ship/Configs/apiato.php +185 -0
- package/Daevin_test/app/Ship/Configs/debugbar.php +275 -0
- package/Daevin_test/app/Ship/Configs/fractal.php +43 -0
- package/Daevin_test/app/Ship/Configs/hashids.php +54 -0
- package/Daevin_test/app/Ship/Configs/ide-helper.php +319 -0
- package/Daevin_test/app/Ship/Configs/notification.php +16 -0
- package/Daevin_test/app/Ship/Configs/repository.php +250 -0
- package/Daevin_test/app/Ship/Contracts/MustVerifyEmail.php +14 -0
- package/Daevin_test/app/Ship/Criterias/CreatedTodayCriteria.php +15 -0
- package/Daevin_test/app/Ship/Criterias/GroupByCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/IsNullCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/NotNullCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/OrderByCreationDateAscendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByCreationDateDescendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByFieldCriteria.php +37 -0
- package/Daevin_test/app/Ship/Criterias/OrderByNameCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByUpdateDateAscendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/OrderByUpdateDateDescendingCriteria.php +14 -0
- package/Daevin_test/app/Ship/Criterias/ThisBetweenDatesCriteria.php +21 -0
- package/Daevin_test/app/Ship/Criterias/ThisEqualThatCriteria.php +20 -0
- package/Daevin_test/app/Ship/Criterias/ThisLikeThatCriteria.php +35 -0
- package/Daevin_test/app/Ship/Criterias/ThisUserCriteria.php +19 -0
- package/Daevin_test/app/Ship/Events/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Exceptions/CreateResourceFailedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/DeleteResourceFailedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/EmailIsMissedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/Handlers/ExceptionsHandler.php +107 -0
- package/Daevin_test/app/Ship/Exceptions/InternalErrorException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/NotAuthorizedResourceException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/NotFoundException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/NotImplementedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/UnsupportedFractalSerializerException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/UpdateResourceFailedException.php +12 -0
- package/Daevin_test/app/Ship/Exceptions/ValidationFailedException.php +12 -0
- package/Daevin_test/app/Ship/Generators/CustomStubs/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Helpers/helpers.php +12 -0
- package/Daevin_test/app/Ship/Kernels/ConsoleKernel.php +46 -0
- package/Daevin_test/app/Ship/Kernels/HttpKernel.php +113 -0
- package/Daevin_test/app/Ship/Listeners/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Mails/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Mails/Templates/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Middlewares/Authenticate.php +16 -0
- package/Daevin_test/app/Ship/Middlewares/EncryptCookies.php +17 -0
- package/Daevin_test/app/Ship/Middlewares/PreventRequestsDuringMaintenance.php +17 -0
- package/Daevin_test/app/Ship/Middlewares/TrimStrings.php +19 -0
- package/Daevin_test/app/Ship/Middlewares/TrustHosts.php +20 -0
- package/Daevin_test/app/Ship/Middlewares/TrustProxies.php +28 -0
- package/Daevin_test/app/Ship/Middlewares/VerifyCsrfToken.php +17 -0
- package/Daevin_test/app/Ship/Migrations/2017_09_12_174826_create_notifications_table.php +35 -0
- package/Daevin_test/app/Ship/Migrations/2019_08_19_000000_create_failed_jobs_table.php +36 -0
- package/Daevin_test/app/Ship/Migrations/2021_03_01_150940_create_jobs_table.php +39 -0
- package/Daevin_test/app/Ship/Notifications/.gitkeep +0 -0
- package/Daevin_test/app/Ship/Parents/Actions/Action.php +10 -0
- package/Daevin_test/app/Ship/Parents/Actions/SubAction.php +10 -0
- package/Daevin_test/app/Ship/Parents/Commands/ConsoleCommand.php +10 -0
- package/Daevin_test/app/Ship/Parents/Controllers/ApiController.php +10 -0
- package/Daevin_test/app/Ship/Parents/Controllers/WebController.php +10 -0
- package/Daevin_test/app/Ship/Parents/Criterias/Criteria.php +10 -0
- package/Daevin_test/app/Ship/Parents/Events/Event.php +10 -0
- package/Daevin_test/app/Ship/Parents/Exceptions/Exception.php +10 -0
- package/Daevin_test/app/Ship/Parents/Factories/Factory.php +10 -0
- package/Daevin_test/app/Ship/Parents/Jobs/Job.php +25 -0
- package/Daevin_test/app/Ship/Parents/Listeners/Listener.php +10 -0
- package/Daevin_test/app/Ship/Parents/Mails/Mail.php +10 -0
- package/Daevin_test/app/Ship/Parents/Middlewares/Middleware.php +10 -0
- package/Daevin_test/app/Ship/Parents/Models/Model.php +11 -0
- package/Daevin_test/app/Ship/Parents/Models/UserModel.php +17 -0
- package/Daevin_test/app/Ship/Parents/Notifications/Notification.php +10 -0
- package/Daevin_test/app/Ship/Parents/Policies/Policy.php +26 -0
- package/Daevin_test/app/Ship/Parents/Providers/AuthServiceProvider.php +20 -0
- package/Daevin_test/app/Ship/Parents/Providers/BroadcastServiceProvider.php +26 -0
- package/Daevin_test/app/Ship/Parents/Providers/EventServiceProvider.php +40 -0
- package/Daevin_test/app/Ship/Parents/Providers/MainServiceProvider.php +24 -0
- package/Daevin_test/app/Ship/Parents/Providers/MiddlewareServiceProvider.php +16 -0
- package/Daevin_test/app/Ship/Parents/Providers/RouteServiceProvider.php +24 -0
- package/Daevin_test/app/Ship/Parents/Repositories/Repository.php +10 -0
- package/Daevin_test/app/Ship/Parents/Requests/Request.php +10 -0
- package/Daevin_test/app/Ship/Parents/Seeders/Seeder.php +10 -0
- package/Daevin_test/app/Ship/Parents/Tasks/Task.php +10 -0
- package/Daevin_test/app/Ship/Parents/Tests/PhpUnit/TestCase.php +51 -0
- package/Daevin_test/app/Ship/Parents/Transformers/Transformer.php +25 -0
- package/Daevin_test/app/Ship/Parents/Values/Value.php +9 -0
- package/Daevin_test/app/Ship/Providers/RouteServiceProvider.php +35 -0
- package/Daevin_test/app/Ship/Providers/ShipProvider.php +44 -0
- package/Daevin_test/app/Ship/Seeders/SeedDeploymentData.php +18 -0
- package/Daevin_test/app/Ship/Seeders/SeedTestingData.php +18 -0
- package/Daevin_test/app/Ship/Tests/TestCase.php +10 -0
- package/Daevin_test/app/Ship/composer.json +21 -0
- package/Daevin_test/artisan +53 -0
- package/Daevin_test/bootstrap/app.php +55 -0
- package/Daevin_test/bootstrap/cache/.gitignore +2 -0
- package/Daevin_test/composer.json +112 -0
- package/Daevin_test/composer.lock +12696 -0
- package/Daevin_test/config/app.php +206 -0
- package/Daevin_test/config/auth.php +117 -0
- package/Daevin_test/config/broadcasting.php +67 -0
- package/Daevin_test/config/cache.php +110 -0
- package/Daevin_test/config/cors.php +34 -0
- package/Daevin_test/config/database.php +151 -0
- package/Daevin_test/config/filesystems.php +76 -0
- package/Daevin_test/config/hashing.php +52 -0
- package/Daevin_test/config/logging.php +119 -0
- package/Daevin_test/config/mail.php +117 -0
- package/Daevin_test/config/queue.php +93 -0
- package/Daevin_test/config/services.php +34 -0
- package/Daevin_test/config/session.php +201 -0
- package/Daevin_test/config/view.php +36 -0
- package/Daevin_test/database/factories/ModelFactory.php +4 -0
- package/Daevin_test/database/migrations/.gitkeep +0 -0
- package/Daevin_test/database/seeders/DatabaseSeeder.php +24 -0
- package/Daevin_test/lang/ar/auth.php +19 -0
- package/Daevin_test/lang/ar/pagination.php +19 -0
- package/Daevin_test/lang/ar/passwords.php +22 -0
- package/Daevin_test/lang/ar/validation.php +149 -0
- package/Daevin_test/lang/en/auth.php +20 -0
- package/Daevin_test/lang/en/pagination.php +19 -0
- package/Daevin_test/lang/en/passwords.php +22 -0
- package/Daevin_test/lang/en/validation.php +169 -0
- package/Daevin_test/lang/es/auth.php +19 -0
- package/Daevin_test/lang/es/pagination.php +19 -0
- package/Daevin_test/lang/es/passwords.php +22 -0
- package/Daevin_test/lang/es/validation.php +149 -0
- package/Daevin_test/lang/fa/auth.php +18 -0
- package/Daevin_test/lang/fa/pagination.php +17 -0
- package/Daevin_test/lang/fa/passwords.php +20 -0
- package/Daevin_test/lang/fa/validation.php +182 -0
- package/Daevin_test/lang/fr/auth.php +19 -0
- package/Daevin_test/lang/fr/pagination.php +19 -0
- package/Daevin_test/lang/fr/passwords.php +22 -0
- package/Daevin_test/lang/fr/validation.php +149 -0
- package/Daevin_test/package-lock.json +10031 -0
- package/Daevin_test/package.json +19 -0
- package/Daevin_test/php_cs.dist.php +39 -0
- package/Daevin_test/phpspec.yml +5 -0
- package/Daevin_test/phpunit.xml +38 -0
- package/Daevin_test/psalm.dist.xml +18 -0
- package/Daevin_test/public/.htaccess +21 -0
- package/Daevin_test/public/favicon.ico +0 -0
- package/Daevin_test/public/index.php +55 -0
- package/Daevin_test/public/robots.txt +2 -0
- package/Daevin_test/public/web.config +28 -0
- package/Daevin_test/resources/css/app.css +0 -0
- package/Daevin_test/resources/js/app.js +1 -0
- package/Daevin_test/resources/js/bootstrap.js +28 -0
- package/Daevin_test/resources/views/.gitkeep +0 -0
- package/Daevin_test/server.php +21 -0
- package/Daevin_test/storage/app/.gitignore +3 -0
- package/Daevin_test/storage/app/public/.gitignore +2 -0
- package/Daevin_test/storage/debugbar/.gitignore +2 -0
- package/Daevin_test/storage/framework/cache/.gitignore +2 -0
- package/Daevin_test/storage/framework/sessions/.gitignore +2 -0
- package/Daevin_test/storage/framework/testing/.gitignore +2 -0
- package/Daevin_test/storage/framework/views/.gitignore +2 -0
- package/Daevin_test/storage/logs/.gitignore +2 -0
- package/Daevin_test/webpack.mix.js +17 -0
- package/bin/classes/Apiato/index.js +208 -0
- package/bin/classes/Containers/Action.js +169 -0
- package/bin/classes/Containers/ComposerJSON.js +27 -0
- package/bin/classes/Containers/Config.js +39 -0
- package/bin/classes/Containers/Controller.js +120 -0
- package/bin/classes/Containers/Factory.js +47 -0
- package/bin/classes/Containers/Migration.js +80 -0
- package/bin/classes/Containers/Model.js +126 -0
- package/bin/classes/Containers/ReadMe.js +212 -0
- package/bin/classes/Containers/Repository.js +54 -0
- package/bin/classes/Containers/Request.js +341 -0
- package/bin/classes/Containers/Route.js +336 -0
- package/bin/classes/Containers/Task.js +225 -0
- package/bin/classes/Containers/Transformer.js +94 -0
- package/bin/classes/Helpers.js +150 -0
- package/bin/classes/tes.js +0 -0
- package/bin/constants.js +11 -0
- package/bin/core/output.json +13 -0
- package/bin/core/schemaToSql.js +118 -0
- package/bin/core/sqlToSchema.js +206 -0
- package/bin/index.js +103 -0
- package/dbconfig.json +74 -0
- package/package.json +39 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
APP_ENV=local
|
2
|
+
APP_KEY=
|
3
|
+
|
4
|
+
APP_DEBUG=true
|
5
|
+
API_DEBUG=true
|
6
|
+
DEBUGBAR_ENABLED=false
|
7
|
+
|
8
|
+
LOG_CHANNEL=stack
|
9
|
+
LOG_DEPRECATIONS_CHANNEL=null
|
10
|
+
LOG_LEVEL=debug
|
11
|
+
|
12
|
+
APP_NAME="apiato"
|
13
|
+
APP_URL=http://apiato.test
|
14
|
+
API_URL=http://api.apiato.test
|
15
|
+
API_PREFIX=/
|
16
|
+
|
17
|
+
HASH_ID=true
|
18
|
+
HASH_ID_KEY=apiato
|
19
|
+
HASH_ID_LENGTH=16
|
20
|
+
|
21
|
+
GLOBAL_API_RATE_LIMIT_ENABLED=true
|
22
|
+
GLOBAL_API_RATE_LIMIT_ATTEMPTS_PER_MIN=30
|
23
|
+
GLOBAL_API_RATE_LIMIT_EXPIRES_IN_MIN=1
|
24
|
+
|
25
|
+
PAGINATION_LIMIT_DEFAULT=10
|
26
|
+
PAGINATION_SKIP=false
|
27
|
+
|
28
|
+
API_TOKEN_EXPIRES=1440
|
29
|
+
API_REFRESH_TOKEN_EXPIRES=43200
|
30
|
+
API_ENABLE_IMPLICIT_GRANT=true
|
31
|
+
|
32
|
+
ELOQUENT_QUERY_CACHE=false
|
33
|
+
ELOQUENT_QUERY_CACHE_TIME=60
|
34
|
+
|
35
|
+
SRC_PATH=app
|
36
|
+
|
37
|
+
ROOT_NAMESPACE=App\
|
38
|
+
USER_NAMESPACE=App\Containers\AppSection\User\Models\
|
39
|
+
ADMIN_ROLE=admin
|
40
|
+
|
41
|
+
DB_CONNECTION=mysql
|
42
|
+
DB_HOST=127.0.0.1
|
43
|
+
DB_PORT=3306
|
44
|
+
|
45
|
+
BROADCAST_DRIVER=log
|
46
|
+
CACHE_DRIVER=file
|
47
|
+
FILESYSTEM_DISK=local
|
48
|
+
QUEUE_CONNECTION=sync
|
49
|
+
|
50
|
+
SESSION_DRIVER=file
|
51
|
+
SESSION_LIFETIME=120
|
52
|
+
SESSION_SECURE_COOKIE=false
|
53
|
+
SESSION_COOKIE=apiato
|
54
|
+
|
55
|
+
MEMCACHED_HOST=127.0.0.1
|
56
|
+
|
57
|
+
DB_DATABASE=homestead
|
58
|
+
DB_USERNAME=homestead
|
59
|
+
DB_PASSWORD=secret
|
60
|
+
|
61
|
+
REDIS_HOST=127.0.0.1
|
62
|
+
REDIS_PASSWORD=null
|
63
|
+
REDIS_PORT=6379
|
64
|
+
|
65
|
+
MAIL_MAILER=log
|
66
|
+
MAIL_HOST=smtp.mailtrap.io
|
67
|
+
MAIL_PORT=2525
|
68
|
+
MAIL_USERNAME=null
|
69
|
+
MAIL_PASSWORD=null
|
70
|
+
MAIL_ENCRYPTION=null
|
71
|
+
MAIL_FROM_ADDRESS="hello@example.com"
|
72
|
+
MAIL_FROM_NAME="${APP_NAME}"
|
73
|
+
|
74
|
+
AWS_ACCESS_KEY_ID=
|
75
|
+
AWS_SECRET_ACCESS_KEY=
|
76
|
+
AWS_DEFAULT_REGION=us-east-1
|
77
|
+
AWS_BUCKET=
|
78
|
+
AWS_USE_PATH_STYLE_ENDPOINT=false
|
79
|
+
|
80
|
+
PUSHER_APP_ID=
|
81
|
+
PUSHER_APP_KEY=
|
82
|
+
PUSHER_APP_SECRET=
|
83
|
+
PUSHER_APP_CLUSTER=mt1
|
84
|
+
|
85
|
+
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
86
|
+
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
87
|
+
|
88
|
+
CLIENT_WEB_ID=
|
89
|
+
CLIENT_WEB_SECRET=
|
90
|
+
|
91
|
+
CLIENT_MOBILE_ID=
|
92
|
+
CLIENT_MOBILE_SECRET=
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright 2021 <Mahmoud Zalt>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,314 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<a href="http://apiato.io">
|
3
|
+
<img alt="Welcome to Apiato"
|
4
|
+
src="https://readme-typing-svg.herokuapp.com/?lines=Welcome+to+Apiato¢er=true&width=550&height=70">
|
5
|
+
</a>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p align="center">
|
9
|
+
<img src="https://github.com/apiato/documentation/blob/master/images/apiato.jpg" alt="Apiato Logo"/>
|
10
|
+
</p>
|
11
|
+
|
12
|
+
<h3 align="center">Build scalable API's faster | With PHP 8.0 and Laravel 9.0</h3>
|
13
|
+
|
14
|
+
<p align="center">
|
15
|
+
<a href="https://travis-ci.org/apiato/apiato"><img src="https://travis-ci.org/apiato/apiato.svg" alt="Build Status"></a>
|
16
|
+
<a href="https://packagist.org/packages/apiato/apiato"><img src="https://img.shields.io/packagist/dt/apiato/apiato" alt="Total Downloads"></a>
|
17
|
+
<a href="https://packagist.org/packages/apiato/apiato"><img src="https://img.shields.io/packagist/v/apiato/apiato" alt="Latest Stable Version"></a>
|
18
|
+
<a href="https://github.com/apiato/apiato"><img src="https://img.shields.io/github/license/apiato/apiato" alt="License"></a>
|
19
|
+
<a href="https://discord.gg/ryPcV4KM5k"><img src="https://img.shields.io/discord/800815227839053834?label=discord" alt="support"></a>
|
20
|
+
</p>
|
21
|
+
|
22
|
+
<a name="Introduction"></a>
|
23
|
+
|
24
|
+
**Apiato** is a framework for building scalable and testable API-Centric Applications with PHP, build on top of Laravel.
|
25
|
+
|
26
|
+
It is designed to help you build scalable API's faster, by providing tools and functionalities that facilitates the development of any API-Centric App.
|
27
|
+
|
28
|
+
Apiato uses the best frameworks, tools and conventions in a very creative way, to deliver a rich set of features for a modern PHP Application.
|
29
|
+
|
30
|
+
**Why!?** Because setting up a solid API from scratch is time consuming (and of course, time is money!).
|
31
|
+
Apiato gives you the core features of robust API's fully documented, for free; so you can focus on writing your business logic, thus deliver faster to your clients.
|
32
|
+
|
33
|
+
<details>
|
34
|
+
<summary>Why API-Centric Apps?</summary>
|
35
|
+
|
36
|
+
Today we’re living in a digital era, where almost everything is connected to the Internet.
|
37
|
+
|
38
|
+
Building cross-devices applications is becoming a must. And to do it, you need APIs (Application Programing Interfaces).
|
39
|
+
|
40
|
+
Web developers are used to serve HTML pages directly from the Backend. However, this traditional method has many disadvantages nowadays.
|
41
|
+
|
42
|
+
API's can serve anything and everything (Mobile Apps, Web Apps, Smart TVs, Smart Watches,...).
|
43
|
+
As well as, it can be exposed to the world allowing developers to interact with your Application and help growing your business.
|
44
|
+
|
45
|
+
API-Centric Apps allows Frontend (Web + Mobile) and Backend developers to work on their codes in parallel.
|
46
|
+
After the Frontend Apps are ready they get attached to the Backend (API-Centric) code to start functioning.
|
47
|
+
This leads to zero decoupling between the Frontend and the Backend code and also removes the dependencies.
|
48
|
+
The API documentation acts as the contract between both sides during the development life cycle of all the Apps.
|
49
|
+
|
50
|
+
</details>
|
51
|
+
|
52
|
+
<a name="Features"></a>
|
53
|
+
## Features
|
54
|
+
|
55
|
+
> Apiato comes with an amazing list of features.
|
56
|
+
|
57
|
+
[See Feature List Here](http://apiato.io/)
|
58
|
+
|
59
|
+
<a name="Documentation"></a>
|
60
|
+
## Documentation
|
61
|
+
|
62
|
+
**Apiato** is built using the new architectural pattern **[Porto](https://github.com/Mahmoudz/Porto)**.
|
63
|
+
> **Porto SAP** is a modern Software Architectural Pattern, designed to help developers organize their Code in a super maintainable way. It is very helpful for big and long term projects, as they tend to have higher complexity with time.
|
64
|
+
|
65
|
+
It's completely **optional** to build your application using the Porto architecture.
|
66
|
+
Alternatively, you can build it using the [MVC](http://apiato.io/docs/getting-started/software-architectural-patterns#mvc-introduction) architecture, and still benefit from all the features of Apiato.
|
67
|
+
|
68
|
+
<br>
|
69
|
+
|
70
|
+
<p align="center">
|
71
|
+
<a href="http://apiato.io/docs/">
|
72
|
+
<img src="https://github.com/apiato/documentation/blob/master/images/documentation-button.png" width=350px" alt="Apiato Docs"/>
|
73
|
+
</a>
|
74
|
+
</p>
|
75
|
+
|
76
|
+
---
|
77
|
+
|
78
|
+
<p align="center">Join our Discord server, by clicking on the icon below.</p>
|
79
|
+
|
80
|
+
|
81
|
+
<p align="center">
|
82
|
+
<a href="https://discord.gg/ryPcV4KM5k">
|
83
|
+
<img src="https://github.com/apiato/documentation/blob/master/images/discord-apiato-icon.png" width=100px" alt="Apiato Discord"/>
|
84
|
+
</a>
|
85
|
+
</p>
|
86
|
+
|
87
|
+
<a name="Contributors"></a>
|
88
|
+
|
89
|
+
## Contributing
|
90
|
+
|
91
|
+
Feel free to dive in! Fix open [Issues](https://github.com/apiato/apiato/issues/) and submit new [features](https://github.com/apiato/apiato/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc).
|
92
|
+
<br>
|
93
|
+
Make sure you check our [contribution guide](http://apiato.io/docs/general/contribution-guide/) before getting started.
|
94
|
+
<br>
|
95
|
+
Apiato follows the [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct) Code of Conduct.
|
96
|
+
|
97
|
+
## Awesome People
|
98
|
+
|
99
|
+
Apiato is an MIT-licensed open source project with its ongoing development made possible entirely by the support of all these smart and generous people, from code contributors to financial contributors. 💜
|
100
|
+
|
101
|
+
### Project Maintainers
|
102
|
+
|
103
|
+
<table>
|
104
|
+
<tbody>
|
105
|
+
<tr>
|
106
|
+
<td align="center" valign="top">
|
107
|
+
<img width="125" height="125" src="https://github.com/mahmoudz.png?s=150">
|
108
|
+
<br>
|
109
|
+
<strong>Mahmoud Zalt</strong>
|
110
|
+
<br>
|
111
|
+
<a href="https://github.com/Mahmoudz">@mahmoudz</a>
|
112
|
+
</td>
|
113
|
+
<td align="center" valign="top">
|
114
|
+
<img width="125" height="125" src="https://github.com/johannesschobel.png?s=150">
|
115
|
+
<br>
|
116
|
+
<strong> Johannes Schobel </strong>
|
117
|
+
<br>
|
118
|
+
<a href="https://github.com/johannesschobel">@johannesschobel</a>
|
119
|
+
</td>
|
120
|
+
<td align="center" valign="top">
|
121
|
+
<img width="125" height="125" src="https://github.com/llstarscreamll.png?s=150">
|
122
|
+
<br>
|
123
|
+
<strong>Johan Alvarez</strong>
|
124
|
+
<br>
|
125
|
+
<a href="https://github.com/llstarscreamll">@llstarscreamll</a>
|
126
|
+
</td>
|
127
|
+
<td align="center" valign="top">
|
128
|
+
<img width="125" height="125" src="https://github.com/zmaren.png?s=150">
|
129
|
+
<br>
|
130
|
+
<strong>Zeljko Marenovic</strong>
|
131
|
+
<br>
|
132
|
+
<a href="https://github.com/zmaren">@zmaren</a>
|
133
|
+
</td>
|
134
|
+
<td align="center" valign="top">
|
135
|
+
<img width="125" height="125" src="https://github.com/rdehnhardt.png?s=150">
|
136
|
+
<br>
|
137
|
+
<strong>Renato Dehnhardt</strong>
|
138
|
+
<br>
|
139
|
+
<a href="https://github.com/rdehnhardt">@rdehnhardt</a>
|
140
|
+
</td>
|
141
|
+
</tr>
|
142
|
+
<tr>
|
143
|
+
<td align="center" valign="top">
|
144
|
+
<img width="125" height="125" src="https://github.com/JulianBustamante.png?s=150">
|
145
|
+
<br>
|
146
|
+
<strong>Julián Bustamante</strong>
|
147
|
+
<br>
|
148
|
+
<a href="https://github.com/JulianBustamante">@JulianBustamante</a>
|
149
|
+
</td>
|
150
|
+
<td align="center" valign="top">
|
151
|
+
<img width="125" height="125" src="https://github.com/fwidm.png?s=150">
|
152
|
+
<br>
|
153
|
+
<strong>FWidm</strong>
|
154
|
+
<br>
|
155
|
+
<a href="https://github.com/FWidm">@FWidm</a>
|
156
|
+
</td>
|
157
|
+
<td align="center" valign="top">
|
158
|
+
<img width="125" height="125" src="https://github.com/lloricode.png?s=150">
|
159
|
+
<br>
|
160
|
+
<strong>Lloric Mayuga Garcia</strong>
|
161
|
+
<br>
|
162
|
+
<a href="https://github.com/lloricode">@lloricode</a>
|
163
|
+
</td>
|
164
|
+
<td align="center" valign="top">
|
165
|
+
<img width="125" height="125" src="https://github.com/jlorente.png?s=150">
|
166
|
+
<br>
|
167
|
+
<strong>Pepe</strong>
|
168
|
+
<br>
|
169
|
+
<a href="https://github.com/jlorente">@jlorente</a>
|
170
|
+
</td>
|
171
|
+
<td align="center" valign="top">
|
172
|
+
<img width="125" height="125" src="https://github.com/anthonyvancauwenberghe.png?s=150">
|
173
|
+
<br>
|
174
|
+
<strong>Anthony Vancauwenberghe</strong>
|
175
|
+
<br>
|
176
|
+
<a href="https://github.com/anthonyvancauwenberghe">@anthonyvancauwenberghe</a>
|
177
|
+
</td>
|
178
|
+
</tr>
|
179
|
+
<tr>
|
180
|
+
<td align="center" valign="top">
|
181
|
+
<img width="125" height="125" src="https://github.com/hz61p1.png?s=150">
|
182
|
+
<br>
|
183
|
+
<strong>Null HZ61 P1</strong>
|
184
|
+
<br>
|
185
|
+
<a href="https://github.com/hz61p1">@hz61p1</a>
|
186
|
+
</td>
|
187
|
+
<td align="center" valign="top">
|
188
|
+
<img width="125" height="125" src="https://github.com/Kyslik.png?s=150">
|
189
|
+
<br>
|
190
|
+
<strong>Martin Kiesel</strong>
|
191
|
+
<br>
|
192
|
+
<a href="https://github.com/Kyslik">@Kyslik</a>
|
193
|
+
</td>
|
194
|
+
<td align="center" valign="top">
|
195
|
+
<img width="125" height="125" src="https://github.com/shalawani.png?s=150">
|
196
|
+
<br>
|
197
|
+
<strong>Samer Halawani</strong>
|
198
|
+
<br>
|
199
|
+
<a href="https://github.com/shalawani">@shalawani</a>
|
200
|
+
</td>
|
201
|
+
<td align="center" valign="top">
|
202
|
+
<img width="125" height="125" src="https://github.com/mohammad-alavi.png?s=150">
|
203
|
+
<br>
|
204
|
+
<strong>Mohammad Alavi</strong>
|
205
|
+
<br>
|
206
|
+
<a href="https://github.com/mohammad-alavi">@Mohammad-Alavi</a>
|
207
|
+
</td>
|
208
|
+
<td align="center" valign="top">
|
209
|
+
<img width="125" height="125" src="https://github.com/mderis.png?s=150">
|
210
|
+
<br>
|
211
|
+
<strong>Moslem Deris</strong>
|
212
|
+
<br>
|
213
|
+
<a href="https://github.com/mderis">@mderis</a>
|
214
|
+
</td>
|
215
|
+
</tr>
|
216
|
+
</tbody>
|
217
|
+
</table>
|
218
|
+
|
219
|
+
### Code Contributors
|
220
|
+
|
221
|
+
[![Apiato Contributors][contributors-src]][contributors-href]
|
222
|
+
|
223
|
+
### Financial Contributors
|
224
|
+
|
225
|
+
[![Open Collective backers][backers-src]][backers-href]
|
226
|
+
|
227
|
+
You can support us using any of the methods below:
|
228
|
+
|
229
|
+
<b>1:</b> [Open Collective](https://opencollective.com/apiato/contribute)
|
230
|
+
<br>
|
231
|
+
<b>2:</b> [Paypal](https://paypal.me/mzmmzz)
|
232
|
+
<br>
|
233
|
+
<b>3:</b> [Github Sponsors](https://github.com/sponsors/Mahmoudz)
|
234
|
+
<br>
|
235
|
+
<b>4:</b> [Patreon](https://www.patreon.com/zalt)
|
236
|
+
|
237
|
+
---
|
238
|
+
|
239
|
+
|
240
|
+
## Sponsors
|
241
|
+
|
242
|
+
Sponsoring is an act of giving in a different fashion. 🌱
|
243
|
+
|
244
|
+
### Gold Sponsors
|
245
|
+
|
246
|
+
<p align="center">
|
247
|
+
|
248
|
+
<a href="https://opencollective.com/apiato/tiers/gold-sponsors/0/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/gold-sponsors/0/avatar.svg?button=false&isActive=true" height="75px"></a>
|
249
|
+
<a href="https://opencollective.com/apiato/tiers/gold-sponsors/1/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/gold-sponsors/1/avatar.svg?button=false&isActive=true" height="75px"></a>
|
250
|
+
<a href="https://opencollective.com/apiato/tiers/gold-sponsors/2/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/gold-sponsors/2/avatar.svg?button=false&isActive=true" height="75px"></a>
|
251
|
+
<a href="https://opencollective.com/apiato/tiers/gold-sponsors/3/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/gold-sponsors/3/avatar.svg?button=false&isActive=true" height="75px"></a>
|
252
|
+
<a href="https://opencollective.com/apiato/tiers/gold-sponsors/4/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/gold-sponsors/4/avatar.svg?button=false&isActive=true" height="75px"></a>
|
253
|
+
|
254
|
+
</p>
|
255
|
+
|
256
|
+
### Silver Sponsors
|
257
|
+
|
258
|
+
<p align="center">
|
259
|
+
|
260
|
+
<a href="https://opencollective.com/apiato/tiers/silver-sponsors/0/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/silver-sponsors/0/avatar.svg?button=false&isActive=true" height="65px"></a>
|
261
|
+
<a href="https://opencollective.com/apiato/tiers/silver-sponsors/1/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/silver-sponsors/1/avatar.svg?button=false&isActive=true" height="65px"></a>
|
262
|
+
<a href="https://opencollective.com/apiato/tiers/silver-sponsors/2/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/silver-sponsors/2/avatar.svg?button=false&isActive=true" height="65px"></a>
|
263
|
+
<a href="https://opencollective.com/apiato/tiers/silver-sponsors/3/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/silver-sponsors/3/avatar.svg?button=false&isActive=true" height="65px"></a>
|
264
|
+
<a href="https://opencollective.com/apiato/tiers/silver-sponsors/4/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/silver-sponsors/4/avatar.svg?button=false&isActive=true" height="65px"></a>
|
265
|
+
<a href="https://opencollective.com/apiato/tiers/silver-sponsors/5/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/silver-sponsors/5/avatar.svg?button=false&isActive=true" height="65px"></a>
|
266
|
+
<a href="https://opencollective.com/apiato/tiers/silver-sponsors/6/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/silver-sponsors/6/avatar.svg?button=false&isActive=true" height="65px"></a>
|
267
|
+
|
268
|
+
</p>
|
269
|
+
|
270
|
+
### Bronze Sponsors
|
271
|
+
|
272
|
+
<p align="center">
|
273
|
+
|
274
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/0/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/0/avatar.svg?button=false&isActive=true" height="55px"></a>
|
275
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/1/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/1/avatar.svg?button=false&isActive=true" height="55px"></a>
|
276
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/2/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/2/avatar.svg?button=false&isActive=true" height="55px"></a>
|
277
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/3/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/3/avatar.svg?button=false&isActive=true" height="55px"></a>
|
278
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/4/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/4/avatar.svg?button=false&isActive=true" height="55px"></a>
|
279
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/5/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/5/avatar.svg?button=false&isActive=true" height="55px"></a>
|
280
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/6/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/6/avatar.svg?button=false&isActive=true" height="55px"></a>
|
281
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/7/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/7/avatar.svg?button=false&isActive=true" height="55px"></a>
|
282
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/8/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/8/avatar.svg?button=false&isActive=true" height="55px"></a>
|
283
|
+
<a href="https://opencollective.com/apiato/tiers/bronze-sponsors/9/website" target="_blank"><img src="https://opencollective.com/apiato/tiers/bronze-sponsors/9/avatar.svg?button=false&isActive=true" height="55px"></a>
|
284
|
+
|
285
|
+
</p>
|
286
|
+
|
287
|
+
You can sponsor us using any of the methods below:
|
288
|
+
|
289
|
+
<b>1:</b> Sponsor via [Open Collective](https://opencollective.com/apiato/contribute/).
|
290
|
+
<br>
|
291
|
+
<b>2:</b> Email us at <a href = "mailto: support@apiato.io">support@apiato.io</a>.
|
292
|
+
|
293
|
+
*Sponsors logos are displayed on the [github repository](https://github.com/apiato/apiato/) page and the [documentation website](http://apiato.io/docs/) home page.*
|
294
|
+
|
295
|
+
|
296
|
+
<a name="License"></a>
|
297
|
+
## License
|
298
|
+
|
299
|
+
[MIT](https://github.com/apiato/apiato/blob/master/LICENSE) © Mahmoud Zalt
|
300
|
+
|
301
|
+
|
302
|
+
[comment]: # (Open Collective Tiers)
|
303
|
+
|
304
|
+
[contributors-src]: https://contrib.rocks/image?repo=apiato/apiato
|
305
|
+
[contributors-href]: https://github.com/apiato/apiato/graphs/contributors
|
306
|
+
[backers-src]: https://opencollective.com/apiato/tiers/awesome-backers.svg?width=890&button=false&isActive=true
|
307
|
+
[backers-href]: https://opencollective.com/apiato#contributors
|
308
|
+
|
309
|
+
[gold-sponsors-src]: https://opencollective.com/apiato/tiers/gold-sponsors.svg?avatarHeight=80&width=890&button=false&isActive=true
|
310
|
+
[gold-sponsors-href]: https://opencollective.com/apiato#contributors
|
311
|
+
[silver-sponsors-src]: https://opencollective.com/apiato/tiers/silver-sponsors.svg?avatarHeight=64&width=890&button=false&isActive=true
|
312
|
+
[silver-sponsors-href]: https://opencollective.com/apiato#contributors
|
313
|
+
[bronze-sponsors-src]: https://opencollective.com/apiato/tiers/bronze-sponsors.svg?avatarHeight=48&width=890&button=false&isActive=true
|
314
|
+
[bronze-sponsors-href]: https://opencollective.com/apiato#contributors
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Containers\AppSection\Authentication\Actions;
|
4
|
+
|
5
|
+
use Apiato\Core\Exceptions\IncorrectIdException;
|
6
|
+
use App\Containers\AppSection\Authentication\Classes\LoginCustomAttribute;
|
7
|
+
use App\Containers\AppSection\Authentication\Exceptions\LoginFailedException;
|
8
|
+
use App\Containers\AppSection\Authentication\Tasks\CallOAuthServerTask;
|
9
|
+
use App\Containers\AppSection\Authentication\Tasks\MakeRefreshCookieTask;
|
10
|
+
use App\Containers\AppSection\Authentication\UI\API\Requests\LoginProxyPasswordGrantRequest;
|
11
|
+
use App\Ship\Parents\Actions\Action as ParentAction;
|
12
|
+
|
13
|
+
class ApiLoginProxyForWebClientAction extends ParentAction
|
14
|
+
{
|
15
|
+
/**
|
16
|
+
* @param LoginProxyPasswordGrantRequest $request
|
17
|
+
* @return array
|
18
|
+
* @throws LoginFailedException
|
19
|
+
* @throws IncorrectIdException
|
20
|
+
*/
|
21
|
+
public function run(LoginProxyPasswordGrantRequest $request): array
|
22
|
+
{
|
23
|
+
$sanitizedData = $request->sanitizeInput(
|
24
|
+
[
|
25
|
+
...array_keys(config('appSection-authentication.login.attributes')),
|
26
|
+
...['password'],
|
27
|
+
]
|
28
|
+
);
|
29
|
+
|
30
|
+
list($username) = LoginCustomAttribute::extract($sanitizedData);
|
31
|
+
$sanitizedData = $this->enrichSanitizedData($username, $sanitizedData);
|
32
|
+
|
33
|
+
$responseContent = app(CallOAuthServerTask::class)->run($sanitizedData, $request->headers->get('accept-language'));
|
34
|
+
$refreshCookie = app(MakeRefreshCookieTask::class)->run($responseContent['refresh_token']);
|
35
|
+
|
36
|
+
return [
|
37
|
+
'response_content' => $responseContent,
|
38
|
+
'refresh_cookie' => $refreshCookie,
|
39
|
+
];
|
40
|
+
}
|
41
|
+
|
42
|
+
private function enrichSanitizedData(string $username, array $sanitizedData): array
|
43
|
+
{
|
44
|
+
$sanitizedData['username'] = $username;
|
45
|
+
$sanitizedData['client_id'] = config('appSection-authentication.clients.web.id');
|
46
|
+
$sanitizedData['client_secret'] = config('appSection-authentication.clients.web.secret');
|
47
|
+
$sanitizedData['grant_type'] = 'password';
|
48
|
+
$sanitizedData['scope'] = '';
|
49
|
+
|
50
|
+
return $sanitizedData;
|
51
|
+
}
|
52
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Containers\AppSection\Authentication\Actions;
|
4
|
+
|
5
|
+
use App\Containers\AppSection\Authentication\UI\API\Requests\LogoutRequest;
|
6
|
+
use App\Ship\Parents\Actions\Action as ParentAction;
|
7
|
+
use Laravel\Passport\RefreshTokenRepository;
|
8
|
+
use Laravel\Passport\TokenRepository;
|
9
|
+
use Lcobucci\JWT\Parser;
|
10
|
+
|
11
|
+
class ApiLogoutAction extends ParentAction
|
12
|
+
{
|
13
|
+
/**
|
14
|
+
* @param LogoutRequest $request
|
15
|
+
* @return void
|
16
|
+
*/
|
17
|
+
public function run(LogoutRequest $request): void
|
18
|
+
{
|
19
|
+
$id = app(Parser::class)->parse($request->bearerToken())->claims()->get('jti');
|
20
|
+
app(TokenRepository::class)->revokeAccessToken($id);
|
21
|
+
app(RefreshTokenRepository::class)->revokeRefreshTokensByAccessTokenId($id);
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Containers\AppSection\Authentication\Actions;
|
4
|
+
|
5
|
+
use Apiato\Core\Exceptions\IncorrectIdException;
|
6
|
+
use App\Containers\AppSection\Authentication\Exceptions\LoginFailedException;
|
7
|
+
use App\Containers\AppSection\Authentication\Exceptions\RefreshTokenMissingException;
|
8
|
+
use App\Containers\AppSection\Authentication\Tasks\CallOAuthServerTask;
|
9
|
+
use App\Containers\AppSection\Authentication\Tasks\MakeRefreshCookieTask;
|
10
|
+
use App\Containers\AppSection\Authentication\UI\API\Requests\RefreshProxyRequest;
|
11
|
+
use App\Ship\Parents\Actions\Action as ParentAction;
|
12
|
+
use Illuminate\Support\Facades\Request;
|
13
|
+
|
14
|
+
class ApiRefreshProxyForWebClientAction extends ParentAction
|
15
|
+
{
|
16
|
+
/**
|
17
|
+
* @param RefreshProxyRequest $request
|
18
|
+
* @return array
|
19
|
+
* @throws LoginFailedException
|
20
|
+
* @throws RefreshTokenMissingException
|
21
|
+
* @throws IncorrectIdException
|
22
|
+
*/
|
23
|
+
public function run(RefreshProxyRequest $request): array
|
24
|
+
{
|
25
|
+
$sanitizedData = $request->sanitizeInput([
|
26
|
+
'refresh_token',
|
27
|
+
]);
|
28
|
+
|
29
|
+
if (!array_key_exists('refresh_token', $sanitizedData) && is_null(Request::cookie('refreshToken'))) {
|
30
|
+
throw new RefreshTokenMissingException();
|
31
|
+
}
|
32
|
+
|
33
|
+
$sanitizedData['refresh_token'] = $sanitizedData['refresh_token'] ?: Request::cookie('refreshToken');
|
34
|
+
$sanitizedData['client_id'] = config('appSection-authentication.clients.web.id');
|
35
|
+
$sanitizedData['client_secret'] = config('appSection-authentication.clients.web.secret');
|
36
|
+
$sanitizedData['grant_type'] = 'refresh_token';
|
37
|
+
$sanitizedData['scope'] = '';
|
38
|
+
|
39
|
+
$responseContent = app(CallOAuthServerTask::class)->run($sanitizedData, $request->headers->get('accept-language'));
|
40
|
+
$refreshCookie = app(MakeRefreshCookieTask::class)->run($responseContent['refresh_token']);
|
41
|
+
|
42
|
+
return [
|
43
|
+
'response_content' => $responseContent,
|
44
|
+
'refresh_cookie' => $refreshCookie,
|
45
|
+
];
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Containers\AppSection\Authentication\Actions;
|
4
|
+
|
5
|
+
use Apiato\Core\Exceptions\IncorrectIdException;
|
6
|
+
use App\Containers\AppSection\Authentication\Mails\ForgotPassword;
|
7
|
+
use App\Containers\AppSection\Authentication\Tasks\CreatePasswordResetTokenTask;
|
8
|
+
use App\Containers\AppSection\Authentication\UI\API\Requests\ForgotPasswordRequest;
|
9
|
+
use App\Containers\AppSection\User\Tasks\FindUserByEmailTask;
|
10
|
+
use App\Ship\Parents\Actions\Action as ParentAction;
|
11
|
+
use App\Ship\Parents\Exceptions\Exception;
|
12
|
+
use Illuminate\Support\Facades\Mail;
|
13
|
+
|
14
|
+
class ForgotPasswordAction extends ParentAction
|
15
|
+
{
|
16
|
+
/**
|
17
|
+
* @param ForgotPasswordRequest $request
|
18
|
+
* @return bool
|
19
|
+
* @throws IncorrectIdException
|
20
|
+
*/
|
21
|
+
public function run(ForgotPasswordRequest $request): bool
|
22
|
+
{
|
23
|
+
$sanitizedData = $request->sanitizeInput([
|
24
|
+
'email',
|
25
|
+
'reseturl',
|
26
|
+
]);
|
27
|
+
|
28
|
+
// Note: It's a good idea to DON'T say if the user email is valid or not
|
29
|
+
// (to avoid brute force checking of user email existing).
|
30
|
+
// so we return 'false' if an exception is thrown
|
31
|
+
try {
|
32
|
+
$user = app(FindUserByEmailTask::class)->run($sanitizedData['email']);
|
33
|
+
} catch (Exception) {
|
34
|
+
return false;
|
35
|
+
}
|
36
|
+
|
37
|
+
$token = app(CreatePasswordResetTokenTask::class)->run($user);
|
38
|
+
|
39
|
+
Mail::send(new ForgotPassword($user, $token, $sanitizedData['reseturl']));
|
40
|
+
|
41
|
+
return true;
|
42
|
+
}
|
43
|
+
}
|
package/Daevin_test/app/Containers/AppSection/Authentication/Actions/GetAuthenticatedUserAction.php
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
namespace App\Containers\AppSection\Authentication\Actions;
|
4
|
+
|
5
|
+
use App\Containers\AppSection\Authentication\UI\API\Requests\GetAuthenticatedUserRequest;
|
6
|
+
use App\Ship\Parents\Actions\Action as ParentAction;
|
7
|
+
use Illuminate\Contracts\Auth\Authenticatable;
|
8
|
+
|
9
|
+
class GetAuthenticatedUserAction extends ParentAction
|
10
|
+
{
|
11
|
+
/**
|
12
|
+
* @param GetAuthenticatedUserRequest $request
|
13
|
+
* @return Authenticatable
|
14
|
+
*/
|
15
|
+
public function run(GetAuthenticatedUserRequest $request): Authenticatable
|
16
|
+
{
|
17
|
+
return $request->user();
|
18
|
+
}
|
19
|
+
}
|