diff --git a/_config/config.yml b/_config/config.yml index e2d37bc..39bbb01 100644 --- a/_config/config.yml +++ b/_config/config.yml @@ -6,7 +6,7 @@ SilverStripe\Core\Injector\Injector: properties: Handlers: jwt: %$Firesphere\GraphQLJWT\Authentication\JWTAuthenticationHandler - Firesphere\GraphQLJWT\JWTAuthenticationHandler: + Firesphere\GraphQLJWT\Authentication\JWTAuthenticationHandler: properties: Authenticator: %$Firesphere\GraphQLJWT\Authentication\JWTAuthenticator --- diff --git a/src/Mutations/CreateTokenMutationCreator.php b/src/Mutations/CreateTokenMutationCreator.php index f74c6f7..e992a80 100644 --- a/src/Mutations/CreateTokenMutationCreator.php +++ b/src/Mutations/CreateTokenMutationCreator.php @@ -47,12 +47,14 @@ public function args() */ public function resolve($object, array $args, $context, ResolveInfo $info) { + /** @var Security $security */ $security = Injector::inst()->get(Security::class); $authenticators = $security->getApplicableAuthenticators(Authenticator::LOGIN); $request = Controller::curr()->getRequest(); $member = null; if (count($authenticators)) { + /** @var Authenticator $authenticator */ foreach ($authenticators as $authenticator) { $member = $authenticator->authenticate($args, $request, $result); if ($result->isValid()) {