@@ -31,13 +31,13 @@ final class LoginLinkHandler implements LoginLinkHandlerInterface
3131 private UrlGeneratorInterface $ urlGenerator ;
3232 private UserProviderInterface $ userProvider ;
3333 private array $ options ;
34- private SignatureHasher $ signatureHashUtil ;
34+ private SignatureHasher $ 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 ,
@@ -52,7 +52,7 @@ public function createLoginLink(UserInterface $user, Request $request = null): L
5252 $ parameters = [
5353 'user ' => $ user ->getUserIdentifier (),
5454 'expires ' => $ expires ,
55- 'hash ' => $ this ->signatureHashUtil ->computeSignatureHash ($ user , $ expires ),
55+ 'hash ' => $ this ->signatureHasher ->computeSignatureHash ($ user , $ expires ),
5656 ];
5757
5858 if ($ request ) {
@@ -93,7 +93,7 @@ public function consumeLoginLink(Request $request): UserInterface
9393 $ expires = $ request ->get ('expires ' );
9494
9595 try {
96- $ this ->signatureHashUtil ->verifySignatureHash ($ user , $ expires , $ hash );
96+ $ this ->signatureHasher ->verifySignatureHash ($ user , $ expires , $ hash );
9797 } catch (ExpiredSignatureException $ e ) {
9898 throw new ExpiredLoginLinkException (ucfirst (str_ireplace ('signature ' , 'login link ' , $ e ->getMessage ())), 0 , $ e );
9999 } catch (InvalidSignatureException $ e ) {
0 commit comments