\Social\ServiceSocialManager

Class SocialManager Handle logic needed for social platform log-in and registration

Summary

Methods
Properties
Constants
__construct()
setAction()
getAction()
setLocale()
getLocale()
getClient()
getModuleOptions()
startProvider()
handleSocialAuthRedirect()
No public properties found
SOCIAL_LOGIN
SOCIAL_REGISTRATION
SOCIAL_LOGIN_OR_REGISTRATION
No protected methods found
$client
$moduleOptions
$socialAuthManager
$sessionContainer
N/A
No private methods found
No private properties found
N/A

Constants

SOCIAL_LOGIN

SOCIAL_LOGIN = 'login'

SOCIAL_REGISTRATION

SOCIAL_REGISTRATION = 'registration'

SOCIAL_LOGIN_OR_REGISTRATION

SOCIAL_LOGIN_OR_REGISTRATION = 'loginregistration'

Properties

$client

$client : \Zend\Http\Client

Extended Zend\Http\Client Used to make HTTP requests in providers

Type

\Zend\Http\Client

$moduleOptions

$moduleOptions : \Social\Options\ModuleOptions

Class object used to aggregate social sign-in configuration options

Type

\Social\Options\ModuleOptions

$socialAuthManager

$socialAuthManager : \Social\Service\SocialAuthManager

Object that manages user authentication and authorisation

Type

\Social\Service\SocialAuthManager

$sessionContainer

$sessionContainer : \Social\Service\Zend\Session\Container

Session container used to persist action between social auth request and response

Type

\Social\Service\Zend\Session\Container

Methods

__construct()

__construct(\Social\Options\ModuleOptions  $options, \Social\Service\SocialAuthManager  $socialAuthManager, \Social\Service\SessionContainer  $sessionContainer) 

Constructor

Parameters

\Social\Options\ModuleOptions $options
\Social\Service\SocialAuthManager $socialAuthManager
\Social\Service\SessionContainer $sessionContainer

setAction()

setAction(string  $action) 

Put current action in session container

Parameters

string $action

getAction()

getAction() : string

Get action name from session container

Returns

string

setLocale()

setLocale(string  $locale) 

Put current locale in session container

Parameters

string $locale

getLocale()

getLocale() : string

Get locale name from session container

Returns

string

getClient()

getClient() : \Social\Service\Zend\Http\Client

Get Client used to make HTTP requests

Returns

\Social\Service\Zend\Http\Client

getModuleOptions()

getModuleOptions() : \Social\Service\ModulOptions

Get module options

Returns

\Social\Service\ModulOptions —

class object

startProvider()

startProvider(string  $providerName) : boolean|\Social\Service\Socail

Create class object for social media platform

Parameters

string $providerName

Returns

boolean|\Social\Service\Socail —

Provider class

handleSocialAuthRedirect()

handleSocialAuthRedirect(array  $clientRequestResult) : \Zend\Authentication\Result

Execute logic for adding status messages and status when someone tries to log in with social media platform

Parameters

array $clientRequestResult

Returns

\Zend\Authentication\Result