From f89a1635a8afd0eccf27c3d2535a34190eba1767 Mon Sep 17 00:00:00 2001 From: klapaudius Date: Mon, 11 Mar 2024 14:33:41 +0100 Subject: [PATCH] #24 Missing class OAuthToken in v5.0 --- .../Authenticator/Oauth2Authenticator.php | 2 +- Security/Authenticator/Token/OAuthToken.php | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Security/Authenticator/Token/OAuthToken.php diff --git a/Security/Authenticator/Oauth2Authenticator.php b/Security/Authenticator/Oauth2Authenticator.php index 72ddf4ce..0b863537 100644 --- a/Security/Authenticator/Oauth2Authenticator.php +++ b/Security/Authenticator/Oauth2Authenticator.php @@ -14,7 +14,7 @@ namespace FOS\OAuthServerBundle\Security\Authenticator; use FOS\OAuthServerBundle\Model\AccessToken; -use FOS\OAuthServerBundle\Security\Authentication\Token\OAuthToken; +use FOS\OAuthServerBundle\Security\Authenticator\Token\OAuthToken; use FOS\OAuthServerBundle\Security\Authenticator\Passport\Badge\AccessTokenBadge; use OAuth2\OAuth2; use OAuth2\OAuth2AuthenticateException; diff --git a/Security/Authenticator/Token/OAuthToken.php b/Security/Authenticator/Token/OAuthToken.php new file mode 100644 index 00000000..eeac71a2 --- /dev/null +++ b/Security/Authenticator/Token/OAuthToken.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace FOS\OAuthServerBundle\Security\Authenticator\Token; + +use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; + +/** + * OAuthToken class. + * + * @author Arnaud Le Blanc + */ +class OAuthToken extends AbstractToken +{ + protected string $token; + + public function setToken(string $token) + { + $this->token = $token; + } + + public function getToken(): string + { + return $this->token; + } + + public function getCredentials(): string + { + return $this->token; + } +} \ No newline at end of file