PHP Класс Elcodi\Store\ConnectBundle\Services\OAuthUserProvider

Автор: Berny Cantos ([email protected])
Наследование: implements HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Symfony\Component\Security\Core\User\UserProviderInterface $userProvider, Elcodi\Component\Core\Services\ObjectDirector $authorizationDirector, Elcodi\Component\Core\Services\ObjectDirector $customerDirector, Doctrine\Common\Persistence\ObjectManager $authorizationObjectManager, Elcodi\Component\User\EventDispatcher\Interfaces\UserEventDispatcherInterface $userEventDispatcher ) Constructor
loadUserByOAuthUserResponse ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface Loads the user by a given UserResponseInterface object.

Защищенные методы

Метод Описание
createAuthorization ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response, Symfony\Component\Security\Core\User\UserInterface $user ) : Authorization Creates an authorization for a given user
createUser ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface Create a new user from a response
findAuthorization ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Authorization | null Checks if a valid authorization exists for a given user
findOrCreateUser ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface Find or creates a user related to a given response of the resource owner
findUser ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface | null Find the user related to the response of the resource owner
getExpirationDate ( integer $secondsToExpiration ) : DateTime Return expiration date given time to expiration
save ( Authorization $authorization ) Persist an authorization
updateAuthorization ( Authorization $authorization, HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Authorization Updates an existing authorization with data from the resource owner

Описание методов

__construct() публичный Метод

Constructor
public __construct ( Symfony\Component\Security\Core\User\UserProviderInterface $userProvider, Elcodi\Component\Core\Services\ObjectDirector $authorizationDirector, Elcodi\Component\Core\Services\ObjectDirector $customerDirector, Doctrine\Common\Persistence\ObjectManager $authorizationObjectManager, Elcodi\Component\User\EventDispatcher\Interfaces\UserEventDispatcherInterface $userEventDispatcher )
$userProvider Symfony\Component\Security\Core\User\UserProviderInterface Where to search for valid users
$authorizationDirector Elcodi\Component\Core\Services\ObjectDirector Authorization Director
$customerDirector Elcodi\Component\Core\Services\ObjectDirector Customer Director
$authorizationObjectManager Doctrine\Common\Persistence\ObjectManager Customer Object Manager
$userEventDispatcher Elcodi\Component\User\EventDispatcher\Interfaces\UserEventDispatcherInterface User event dispatcher

createAuthorization() защищенный Метод

Creates an authorization for a given user
protected createAuthorization ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response, Symfony\Component\Security\Core\User\UserInterface $user ) : Authorization
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface Response of the resource owner
$user Symfony\Component\Security\Core\User\UserInterface User
Результат Elcodi\Store\ConnectBundle\Entity\Authorization

createUser() защищенный Метод

Create a new user from a response
protected createUser ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface
Результат Symfony\Component\Security\Core\User\UserInterface

findAuthorization() защищенный Метод

Checks if a valid authorization exists for a given user
protected findAuthorization ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Authorization | null
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface Response of the ResourceOwner
Результат Elcodi\Store\ConnectBundle\Entity\Authorization | null

findOrCreateUser() защищенный Метод

Find or creates a user related to a given response of the resource owner
protected findOrCreateUser ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface Response of the resource owner
Результат Symfony\Component\Security\Core\User\UserInterface

findUser() защищенный Метод

Find the user related to the response of the resource owner
protected findUser ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface | null
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface
Результат Symfony\Component\Security\Core\User\UserInterface | null

getExpirationDate() защищенный Метод

Return expiration date given time to expiration
protected getExpirationDate ( integer $secondsToExpiration ) : DateTime
$secondsToExpiration integer
Результат DateTime

loadUserByOAuthUserResponse() публичный Метод

Loads the user by a given UserResponseInterface object.
public loadUserByOAuthUserResponse ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface
Результат Symfony\Component\Security\Core\User\UserInterface

save() защищенный Метод

Persist an authorization
protected save ( Authorization $authorization )
$authorization Elcodi\Store\ConnectBundle\Entity\Authorization Authorization to persist

updateAuthorization() защищенный Метод

Updates an existing authorization with data from the resource owner
protected updateAuthorization ( Authorization $authorization, HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Authorization
$authorization Elcodi\Store\ConnectBundle\Entity\Authorization Authorization
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface Response of the resource owner
Результат Elcodi\Store\ConnectBundle\Entity\Authorization