Commit d6a350da authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout de la fonctionnalité 'mot de passe oublié'. Attention: requiert une màj de la BDD.

parent ecfc8ff5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@
        "unicaen/app":                                  "^1.3",
        "zf-commons/zfc-user-doctrine-orm":             ">=0.1",
        "jasig/phpcas":                                 ">=1.3.3",
        "bjyoungblood/bjy-authorize":                   ">=1.4"
        "bjyoungblood/bjy-authorize":                   ">=1.4",
        "ramsey/uuid":                                  "^3.8"
    },
    "require-dev": {
        "phpunit/PHPUnit":                              ">=3.7"
+22 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ use UnicaenAuth\Controller\AuthControllerFactory;
use UnicaenAuth\Service\ShibService;
use UnicaenAuth\Service\ShibServiceFactory;
use UnicaenAuth\Service\UserContextFactory;
use UnicaenAuth\Service\UserMapperFactory;
use UnicaenAuth\View\Helper\LdapConnectViewHelperFactory;
use UnicaenAuth\View\Helper\LocalConnectViewHelperFactory;
use UnicaenAuth\View\Helper\ShibConnectViewHelperFactory;
@@ -154,6 +155,8 @@ return [
                ['controller' => 'UnicaenAuth\Controller\Utilisateur', 'action' => 'selectionner-profil', 'roles' => []],

                ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'shibboleth', 'roles' => []],
                ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'requestPasswordReset', 'roles' => []],
                ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'changePassword', 'roles' => []],
            ],
        ],
    ],
@@ -221,6 +224,24 @@ return [
                            ],
                        ],
                    ],
                    'requestPasswordReset' => [
                        'type'    => 'Segment',
                        'options' => [
                            'route'    => '/request-password-reset',
                            'defaults' => [
                                'action'     => 'requestPasswordReset',
                            ],
                        ],
                    ],
                    'changePassword' => [
                        'type'    => 'Segment',
                        'options' => [
                            'route'    => '/change-password/:token',
                            'defaults' => [
                                'action'     => 'changePassword',
                            ],
                        ],
                    ],
                ],
            ],
            'zfcuser'     => [
@@ -428,6 +449,7 @@ return [
            'zfcuser_redirect_callback'                => 'UnicaenAuth\Authentication\RedirectCallbackFactory', // substituion
            ShibService::class                         => ShibServiceFactory::class,
            'UnicaenAuth\Service\UserContext'          => UserContextFactory::class,
            'zfcuser_user_mapper'                      => UserMapperFactory::class,
            'MouchardCompleterAuth'        => 'UnicaenAuth\Mouchard\MouchardCompleterAuthFactory',
        ],
        'shared' => [
+4 −0
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@ CREATE TABLE user (
  UNIQUE INDEX `unique_username` (`username` ASC)
) ENGINE=InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;

alter table user add PASSWORD_RESET_TOKEN varchar2(256) default null;

create unique index USER_PASSWORD_RESET_TOKEN_UN on user (PASSWORD_RESET_TOKEN);


CREATE TABLE IF NOT EXISTS `user_role` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@ CREATE TABLE "USER"
);
CREATE SEQUENCE "USER_ID_SEQ" ;

alter table "USER" add PASSWORD_RESET_TOKEN varchar2(256) default null;

create unique index USER_PASSWORD_RESET_TOKEN_UN on "USER" (PASSWORD_RESET_TOKEN);


CREATE TABLE USER_ROLE
(	"ID" NUMBER(*,0) NOT NULL ENABLE,
+4 −0
Original line number Diff line number Diff line
@@ -8,6 +8,10 @@ CREATE TABLE "user" (
) ;
CREATE UNIQUE INDEX user_username_unique ON "user" (username);

alter table "user" add PASSWORD_RESET_TOKEN varchar2(256) default null;

create unique index USER_PASSWORD_RESET_TOKEN_UN on "user" (PASSWORD_RESET_TOKEN);

CREATE TABLE user_role (
  id BIGSERIAL PRIMARY KEY,
  role_id VARCHAR(64) NOT NULL,
Loading