wip
This commit is contained in:
43
src/Service/Security/Provider.php
Normal file
43
src/Service/Security/Provider.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Security;
|
||||
|
||||
use League\OAuth2\Client\Provider\AbstractProvider;
|
||||
use League\OAuth2\Client\Provider\GenericResourceOwner;
|
||||
use League\OAuth2\Client\Token\AccessToken;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class Provider extends AbstractProvider
|
||||
{
|
||||
|
||||
public function getBaseAuthorizationUrl(): string
|
||||
{
|
||||
return 'https://oauth.simonis.lol/application/o/authorize/';
|
||||
}
|
||||
|
||||
public function getBaseAccessTokenUrl(array $params): string
|
||||
{
|
||||
return 'https://oauth.simonis.lol/application/o/token/';
|
||||
}
|
||||
|
||||
public function getResourceOwnerDetailsUrl(AccessToken $token)
|
||||
{
|
||||
return 'https://oauth.simonis.lol/application/o/userinfo/';
|
||||
}
|
||||
|
||||
protected function getDefaultScopes(): array
|
||||
{
|
||||
return ['email', 'profile', 'openid'];
|
||||
}
|
||||
|
||||
protected function checkResponse(ResponseInterface $response, $data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected function createResourceOwner(array $response, AccessToken $token)
|
||||
{
|
||||
dd($response);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user