-
-
Notifications
You must be signed in to change notification settings - Fork 801
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace custom authenticator passport with custom badge usage
- Loading branch information
Showing
4 changed files
with
57 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/Security/Http/Authenticator/Passport/Badge/OAuthTokenBadge.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the HWIOAuthBundle package. | ||
* | ||
* (c) Hardware Info <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace HWI\Bundle\OAuthBundle\Security\Http\Authenticator\Passport\Badge; | ||
|
||
use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken; | ||
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; | ||
|
||
final class OAuthTokenBadge implements BadgeInterface | ||
{ | ||
private OAuthToken $token; | ||
|
||
public function __construct(OAuthToken $token) | ||
{ | ||
$this->token = $token; | ||
} | ||
|
||
public function isResolved(): bool | ||
{ | ||
return true; | ||
} | ||
|
||
public function getToken(): OAuthToken | ||
{ | ||
return $this->token; | ||
} | ||
} |
51 changes: 0 additions & 51 deletions
51
src/Security/Http/Authenticator/Passport/SelfValidatedOAuthPassport.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters