22
33namespace FlexAuth \Type \JWT ;
44
5- use FlexAuth \AuthFlexTypeProviderInterface ;
5+ use FlexAuth \FlexAuthTypeProviderInterface ;
66use Symfony \Component \HttpFoundation \Request ;
77use Symfony \Component \HttpFoundation \Response ;
88use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
@@ -25,18 +25,18 @@ class JWTTokenAuthenticator extends AbstractGuardAuthenticator
2525 private $ JWTUserFactory ;
2626 /** @var JWTEncoderInterface */
2727 private $ JWTEncoder ;
28- /** @var AuthFlexTypeProviderInterface */
29- private $ authFlexTypeProvider ;
28+ /** @var FlexAuthTypeProviderInterface */
29+ private $ flexAuthTypeProvider ;
3030
3131 public function __construct (
3232 JWTUserFactoryInterface $ JWTUserFactory ,
3333 JWTEncoderInterface $ JWTEncoder ,
34- AuthFlexTypeProviderInterface $ authFlexTypeProvider
34+ FlexAuthTypeProviderInterface $ flexAuthTypeProvider
3535 )
3636 {
3737 $ this ->JWTUserFactory = $ JWTUserFactory ;
3838 $ this ->JWTEncoder = $ JWTEncoder ;
39- $ this ->authFlexTypeProvider = $ authFlexTypeProvider ;
39+ $ this ->flexAuthTypeProvider = $ flexAuthTypeProvider ;
4040 }
4141
4242 public function supports (Request $ request )
@@ -65,7 +65,7 @@ public function getCredentials(Request $request)
6565
6666 public function createTokenFromUser (UserInterface $ user ): string
6767 {
68- $ params = $ this ->authFlexTypeProvider ->provide ();
68+ $ params = $ this ->flexAuthTypeProvider ->provide ();
6969 $ userField = $ params ['user_field ' ] ?? 'username ' ;
7070 $ roleField = $ params ['role_field ' ] ?? 'permissions ' ;
7171
@@ -83,11 +83,11 @@ public function getUser($credentialsToken, UserProviderInterface $userProvider)
8383 {
8484 if (!is_string ($ credentialsToken )) {
8585 throw new \InvalidArgumentException (
86- sprintf ('The first argument of the "%s()" method must be string. ' , __METHOD__ , __CLASS__ )
86+ sprintf ('The first argument of the "%s::%s ()" method must be string. ' , __CLASS__ , __METHOD__ )
8787 );
8888 }
8989
90- $ params = $ this ->authFlexTypeProvider ->provide ();
90+ $ params = $ this ->flexAuthTypeProvider ->provide ();
9191 $ userField = $ params ['user_field ' ] ?? 'username ' ;
9292 $ roleField = $ params ['role_field ' ] ?? 'permissions ' ;
9393
0 commit comments