Bonjour,
J'essaye de faire un formulaire d'identification avec Spring. Si l'identification est réussie je veux placer un objet User en session.
J'ai crée un bean pour contenir les données du formulaire (Authentification), un contrôleur (AuthentificationFormController) et un validateur (AuthentificationValidator).
Lorsque je teste j'ai des logs corrects :
2007-07-11 15:50:01,732 INFO [forms.Authentification] - <Login set to root>
2007-07-11 15:50:01,732 INFO [validators.AuthentificationValidator] - <Validating forms.Authentification@1b15e2>
2007-07-11 15:50:01,732 INFO [web.AuthentificationFormController] - <Contrôle d'identification.>
Ma question :
Ou placer les tests d'identifications ? AuthentificationValidator implements Validator ou AuthentificationFormController extends SimpleFormController ou encore dans mon bean Authentification ?
Je pense que l'idéal est de placer le test dans le contrôleur mais je ne sais pas comment placer l'objet User dans la session...
Merci
Partager