Bonjour à tous,

Essayant tant bien que mal d'arriver à une simple utilisation symfony, je suis en passe de réussir. Cependant, quelque chose m'échappe...

J'ai réalisé un petit formulaire de test et le système d'autentification se déroule apparemment sans problème vu que je n'ai aucune erreur d'affichée. Cependant, je constate qu'au submit de mon formulaire, aucune personne n'est logguée (selon la toolbar) et je reviens systématiquement sur la page d'accueil.

Des idées?

Code Yaml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
security:
    encoders:
        UmanTeam\UmanProjectBundle\Entity\Utilisateur:
            algorithm: sha512
            iterations: 10
            encode_as_base64: true
 
    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
 
    providers:
        umanteam:
          entity: { class: UmanTeamUmanProjectBundle:Utilisateur, property: utilisateurLogin }
    firewalls:
        umanteam:
             pattern: ^/Projet
             provider: umanteam
             anonymous: ~
             form_login:
                check_path: /Projet/login_check
                login_path: /
             http_basic: ~                      
    access_control:
        #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
        #- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
Entité Utilisateur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
 
 
<?php
 
namespace UmanTeam\UmanProjectBundle\Entity;
 
use Symfony\Component\Security\Core\User\UserInterface;
 
use Doctrine\ORM\Mapping as ORM;
 
/**
 * UmanTeam\UmanProjectBundle\Entity\Utilisateur
 *
 * @ORM\Table(name="utilisateur")
 * @ORM\Entity
 */
class Utilisateur implements UserInterface
{
    /**
     * @var integer $utilisateurId
     *
     * @ORM\Column(name="utilisateur_id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    protected $utilisateurId;
 
    /**
     * @var string $utilisateurNom
     *
     * @ORM\Column(name="utilisateur_nom", type="string", length=100, nullable=false)
     */
    protected $utilisateurNom;
 
    /**
     * @var string $utilisateurPrenom
     *
     * @ORM\Column(name="utilisateur_prenom", type="string", length=100, nullable=false)
     */
    protected $utilisateurPrenom;
 
    /**
     * @var string $utilisateurLogin
     *
     * @ORM\Column(name="utilisateur_login", type="string", length=100, nullable=false, unique=true)
     */
    protected $utilisateurLogin;
 
    /**
     * @var string $utilisateurPassword
     *
     * @ORM\Column(name="utilisateur_password", type="string", length=300, nullable=false)
     */
    protected $utilisateurPassword;
 
    /**
     * @var boolean $utilisateurIsadministrator
     *
     * @ORM\Column(name="utilisateur_isAdministrator", type="boolean", nullable=false)
     */
    protected $utilisateurIsadministrator;
 
    /**
     * @var Ticket
     *
     * @ORM\ManyToMany(targetEntity="Ticket", mappedBy="utilisateurUtilisateur")
     */
    protected $ticketTicket;
 
    /**
     * @var Projet
     *
     * @ORM\ManyToMany(targetEntity="Projet", mappedBy="utilisateurUtilisateur")
     */
    protected $projetProjet;
 
    /**
     * @var Role
     *
     * @ORM\ManyToOne(targetEntity="Role")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="role_role_id", referencedColumnName="role_id")
     * })
     */
    protected $roleRole;
 
    public function __construct()
    {
        $this->ticketTicket = new \Doctrine\Common\Collections\ArrayCollection();
    	$this->projetProjet = new \Doctrine\Common\Collections\ArrayCollection();
    }
 
 
    /**
     * Get utilisateurId
     *
     * @return integer 
     */
    public function getUtilisateurId()
    {
        return $this->utilisateurId;
    }
 
    /**
     * Set utilisateurNom
     *
     * @param string $utilisateurNom
     */
    public function setUtilisateurNom($utilisateurNom)
    {
        $this->utilisateurNom = $utilisateurNom;
    }
 
    /**
     * Get utilisateurNom
     *
     * @return string 
     */
    public function getUtilisateurNom()
    {
        return $this->utilisateurNom;
    }
 
    /**
     * Set utilisateurPrenom
     *
     * @param string $utilisateurPrenom
     */
    public function setUtilisateurPrenom($utilisateurPrenom)
    {
        $this->utilisateurPrenom = $utilisateurPrenom;
    }
 
    /**
     * Get utilisateurPrenom
     *
     * @return string 
     */
    public function getUtilisateurPrenom()
    {
        return $this->utilisateurPrenom;
    }
 
    /**
     * Set utilisateurLogin
     *
     * @param string $utilisateurLogin
     */
    public function setUtilisateurLogin($utilisateurLogin)
    {
        $this->utilisateurLogin = $utilisateurLogin;
    }
 
    /**
     * Get utilisateurLogin
     *
     * @return string 
     */
    public function getUtilisateurLogin()
    {
        return $this->utilisateurLogin;
    }
 
    /**
     * Get utilisateurLogin
     *
     * @return string
     */
    public function getUsername()
    {
    	return $this->utilisateurLogin;
    }
 
    /**
     * Set utilisateurPassword
     *
     * @param string $utilisateurPassword
     */
    public function setUtilisateurPassword($utilisateurPassword)
    {
        $this->utilisateurPassword = $utilisateurPassword;
    }
 
    /**
     * Get utilisateurPassword
     *
     * @return string 
     */
    public function getUtilisateurPassword()
    {
        return $this->utilisateurPassword;
    }
 
    /**
     * Get utilisateurPassword
     *
     * @return string
     */
    public function getPassword()
    {
    	return $this->utilisateurPassword;
    }
 
    /**
     * Set utilisateurIsadministrator
     *
     * @param boolean $utilisateurIsadministrator
     */
    public function setUtilisateurIsadministrator($utilisateurIsadministrator)
    {
        $this->utilisateurIsadministrator = $utilisateurIsadministrator;
    }
 
    /**
     * Get utilisateurIsadministrator
     *
     * @return boolean 
     */
    public function getUtilisateurIsadministrator()
    {
        return $this->utilisateurIsadministrator;
    }
 
    /**
     * Add ticketTicket
     *
     * @param UmanTeam\UmanProjectBundle\Entity\Ticket $ticketTicket
     */
    public function addTicket(\UmanTeam\UmanProjectBundle\Entity\Ticket $ticketTicket)
    {
        $this->ticketTicket[] = $ticketTicket;
    }
 
    /**
     * Get ticketTicket
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getTicketTicket()
    {
        return $this->ticketTicket;
    }
 
    /**
     * Add projetProjet
     *
     * @param UmanTeam\UmanProjectBundle\Entity\Projet $projetProjet
     */
    public function addProjet(\UmanTeam\UmanProjectBundle\Entity\Projet $projetProjet)
    {
        $this->projetProjet[] = $projetProjet;
    }
 
    /**
     * Get projetProjet
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getProjetProjet()
    {
        return $this->projetProjet;
    }
 
    /**
     * Set roleRole
     *
     * @param UmanTeam\UmanProjectBundle\Entity\Role $roleRole
     */
    public function setRoleRole(\UmanTeam\UmanProjectBundle\Entity\Role $roleRole)
    {
        $this->roleRole = $roleRole;
    }
 
    /**
     * Get roleRole
     *
     * @return UmanTeam\UmanProjectBundle\Entity\Role 
     */
    public function getRoleRole()
    {
        return $this->roleRole;
    }
 
    public function getRoles()
    {
    	return array('ROLE_USER');
    }
 
    public function equals(UserInterface $user)
    {
    	return $this->utilisateurLogin === $user->getUsername();
    }
 
    public function eraseCredentials()
    {
 
    }
 
    public function getSalt()
    {
    	return '';
    }
}
Entité Role :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
 
<?php
 
namespace UmanTeam\UmanProjectBundle\Entity;
 
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\Role\RoleInterface;
 
/**
 * UmanTeam\UmanProjectBundle\Entity\Role
 *
 * @ORM\Table(name="role")
 * @ORM\Entity
 */
class Role implements RoleInterface
{
    /**
     * @var integer $roleId
     *
     * @ORM\Column(name="role_id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    protected $roleId;
 
    /**
     * @var string $roleNom
     *
     * @ORM\Column(name="role_nom", type="string", length=100, nullable=false)
     */
    protected $roleNom;
 
 
 
    /**
     * Get roleId
     *
     * @return integer 
     */
    public function getRoleId()
    {
        return $this->roleId;
    }
 
    /**
     * Set roleNom
     *
     * @param string $roleNom
     */
    public function setRoleNom($roleNom)
    {
        $this->roleNom = $roleNom;
    }
 
    /**
     * Get roleNom
     *
     * @return string 
     */
    public function getRoleNom()
    {
        return $this->roleNom;
    }
 
    /**
     * Gets the id.
     *
     * @return integer The id.
     */
    public function getId()
    {
    	return $this->id;
    }
 
    /**
     * Gets the role name.
     *
     * @return string The name.
     */
    public function getName()
    {
    	return $this->roleNom;
    }
 
    /**
     * Sets the role name.
     *
     * @param string $value The name.
     */
    public function setName($value)
    {
    	$this->roleNom = $value;
    }
 
    /**
     * Gets the DateTime the role was created.
     *
     * @return DateTime A DateTime object.
     */
    public function getCreatedAt()
    {
    	return $this->createdAt;
    }
 
    /**
     * Consturcts a new instance of Role.
     */
    public function __construct()
    {
    	$this->createdAt = new \DateTime();
    }
 
    /**
     * Implementation of getRole for the RoleInterface.
     *
     * @return string The role.
     */
    public function getRole()
    {
    	return $this->getName();
    }
}