Skip to content
Browse files

Fixed typo and cleaned some CS :P

  • Loading branch information...
1 parent 123f144 commit 65f554b45f913126845c9df27726149ca57472e5 @stloyd stloyd committed Jan 16, 2012
Showing with 6 additions and 8 deletions.
  1. +6 −8 Security/Core/Authentication/Provider/OAuthProvider.php
View
14 Security/Core/Authentication/Provider/OAuthProvider.php
@@ -9,8 +9,6 @@
Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface,
Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
-
-
use Etcpasswd\OAuthBundle\Security\Core\Authentication\Token\OAuthToken;
/**
@@ -25,8 +23,8 @@ class OAuthProvider implements AuthenticationProviderInterface
public function __construct(UserProviderInterface $userProvider, $providerKey)
{
- $this->userProvider = $userProvider;
- $this->providerKey = $providerKey;
+ $this->userProvider = $userProvider;
+ $this->providerKey = $providerKey;
}
/**
@@ -36,9 +34,10 @@ public function authenticate(TokenInterface $token)
{
$user = $this->userProvider->loadUserByUsername($token->getUsername());
if ($user) {
- $authenticatedToken = new OAuthtoken($user->getRoles(), $token->getResponse());
- $authenticatedToken ->setAuthenticated(true);
- $authenticatedToken ->setUser($user);
+ $authenticatedToken = new OAuthToken($user->getRoles(), $token->getResponse());
+ $authenticatedToken->setAuthenticated(true);
+ $authenticatedToken->setUser($user);
+
return $authenticatedToken;
}
@@ -49,5 +48,4 @@ public function supports(TokenInterface $token)
{
return $token instanceof OAuthToken;
}
-
}

0 comments on commit 65f554b

Please sign in to comment.
Something went wrong with that request. Please try again.