Skip to content

Commit 25b4f3c

Browse files
authored
Merge pull request #32 from rudott/master
Added checkPreAuth call before checkPostAuth
2 parents c4b1765 + e751bfe commit 25b4f3c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/LightSaml/SpBundle/Security/Authentication/Provider/LightsSamlSpAuthenticationProvider.php

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public function authenticate(TokenInterface $token)
119119
}
120120

121121
if ($this->userChecker && $user instanceof UserInterface) {
122+
$this->userChecker->checkPreAuth($user);
122123
$this->userChecker->checkPostAuth($user);
123124
}
124125

tests/LightSaml/SpBundle/Tests/Security/Authentication/Provider/LightsSamlSpAuthenticationProviderTest.php

100644100755
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ public function test_calls_user_checker_if_provided()
284284
->method('loadUserByUsername')
285285
->willReturn($user);
286286

287+
$userCheckerMock->expects($this->once())
288+
->method('checkPreAuth')
289+
->with($user);
290+
287291
$userCheckerMock->expects($this->once())
288292
->method('checkPostAuth')
289293
->with($user);

0 commit comments

Comments
 (0)