Skip to content

Commit

Permalink
Fix more namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Erkelens committed Nov 14, 2017
1 parent c067dfa commit 803d7c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down
2 changes: 2 additions & 0 deletions src/Mutations/CreateTokenMutationCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 803d7c8

Please sign in to comment.