diff --git a/skeleton/meta/definitions/auth.php b/skeleton/meta/definitions/auth.php index 3f0f062..c07a3d9 100644 --- a/skeleton/meta/definitions/auth.php +++ b/skeleton/meta/definitions/auth.php @@ -4,6 +4,8 @@ use function DI\autowire, DI\create, DI\get; use %NAMESPACE%\Entity; +use Psr\Http\Message\ServerRequestInterface; + use Ulmus\Entity\Field\Datetime, Ulmus\User\Lib\Authenticate; @@ -17,7 +19,7 @@ use Picea\Picea; use TheBugs\Email\{ EmailConfiguration, MailerInterface, SwiftMailer }; -use Taxus\Taxus; +use Taxus\{ Taxus, PermissionGrantInterface }; return [ Entity\User::class => autowire(Entity\User::class), @@ -25,7 +27,7 @@ return [ Authenticate::class => create(Authenticate::class)->constructor(get(Session::class), get(Cookie::class), get('authentication.method')), SecurityHandler::class => create(SecurityHandler::class)->constructor(function() { - return new RedirectResponse(getenv("URL_BASE")."/connexion"); + return new RedirectResponse(getenv("URL_BASE")."/login"); }, get('authentication.unauthorize'), get(Taxus::class)), 'authentication.error' => function($c, Picea $picea) { diff --git a/skeleton/public/.htaccess b/skeleton/public/.htaccess index b3bd338..11311da 100644 --- a/skeleton/public/.htaccess +++ b/skeleton/public/.htaccess @@ -1,6 +1,10 @@ RewriteEngine On + # Force HTTPS (disabled by default) + # RewriteCond %{HTTPS} off + # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # Remove trailing slashes from request URL RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ diff --git a/skeleton/public/index.php b/skeleton/public/index.php index eb8a548..52f18c1 100644 --- a/skeleton/public/index.php +++ b/skeleton/public/index.php @@ -1,3 +1,8 @@ getMessage(); +} \ No newline at end of file