@@ -31,13 +31,13 @@ final class LoginLinkHandler implements LoginLinkHandlerInterface
3131 private $ urlGenerator ;
3232 private $ userProvider ;
3333 private $ options ;
34- private $ signatureHashUtil ;
34+ private $ signatureHasher ;
3535
36- public function __construct (UrlGeneratorInterface $ urlGenerator , UserProviderInterface $ userProvider , SignatureHasher $ signatureHashUtil , array $ options )
36+ public function __construct (UrlGeneratorInterface $ urlGenerator , UserProviderInterface $ userProvider , SignatureHasher $ signatureHasher , array $ options )
3737 {
3838 $ this ->urlGenerator = $ urlGenerator ;
3939 $ this ->userProvider = $ userProvider ;
40- $ this ->signatureHashUtil = $ signatureHashUtil ;
40+ $ this ->signatureHasher = $ signatureHasher ;
4141 $ this ->options = array_merge ([
4242 'route_name ' => null ,
4343 'lifetime ' => 600 ,
@@ -53,7 +53,7 @@ public function createLoginLink(UserInterface $user, Request $request = null): L
5353 // @deprecated since Symfony 5.3, change to $user->getUserIdentifier() in 6.0
5454 'user ' => method_exists ($ user , 'getUserIdentifier ' ) ? $ user ->getUserIdentifier () : $ user ->getUsername (),
5555 'expires ' => $ expires ,
56- 'hash ' => $ this ->signatureHashUtil ->computeSignatureHash ($ user , $ expires ),
56+ 'hash ' => $ this ->signatureHasher ->computeSignatureHash ($ user , $ expires ),
5757 ];
5858
5959 if ($ request ) {
@@ -101,7 +101,7 @@ public function consumeLoginLink(Request $request): UserInterface
101101 $ expires = $ request ->get ('expires ' );
102102
103103 try {
104- $ this ->signatureHashUtil ->verifySignatureHash ($ user , $ expires , $ hash );
104+ $ this ->signatureHasher ->verifySignatureHash ($ user , $ expires , $ hash );
105105 } catch (ExpiredSignatureException $ e ) {
106106 throw new ExpiredLoginLinkException (ucfirst (str_ireplace ('signature ' , 'login link ' , $ e ->getMessage ())), 0 , $ e );
107107 } catch (InvalidSignatureException $ e ) {
0 commit comments