\Social\ControllerSocialController

Class SocialController Handles requests pertaining to login and registration through social media providers

Summary

Methods
Properties
Constants
__construct()
failedLoginAction()
startLoginAction()
startRegistrationAction()
startLoginOrRegistrationAction()
getCallbackUrl()
redirectedAction()
No public properties found
ROUTE_REDIRECT
getRedirectUrl()
$socialManager
N/A
No private methods found
No private properties found
N/A

Constants

ROUTE_REDIRECT

ROUTE_REDIRECT = 'social'

Properties

$socialManager

$socialManager : \Social\Service\SocialManager

Object where much of the (database) logic is handled

Type

\Social\Service\SocialManager

Methods

__construct()

__construct(\Social\Service\SocialManager  $socialManager) 

Instantiate class and inject SocialManager

Parameters

\Social\Service\SocialManager $socialManager

failedLoginAction()

failedLoginAction() : \Zend\View\Model\ViewModel

Page where user is redirected if social login fails

Returns

\Zend\View\Model\ViewModel

startLoginAction()

startLoginAction() : \Zend\View\Model\ViewModel

Action that is requested when user clicks on social auth image/link on login page (when login and/or registration is NOT enabled) NOTE: Remove from AccessControlList if login and/or registration is enabled

Returns

\Zend\View\Model\ViewModel

startRegistrationAction()

startRegistrationAction() : \Zend\View\Model\ViewModel

Action that is requested when user registration via social login is enabled and user clicks on the image/link on the registration page NOTE: Remove from AccessControlList if not enabled just to be sure

Returns

\Zend\View\Model\ViewModel

startLoginOrRegistrationAction()

startLoginOrRegistrationAction() : \Zend\View\Model\ViewModel

Action that is requested when user clicks on social auth image/link on login page (when login and/or registration IS enabled) NOTE: Remove from AccessControlList if not enabled

Returns

\Zend\View\Model\ViewModel

getCallbackUrl()

getCallbackUrl(string  $providerName) : string

Get the URL which the user is redirected back to after the social provider authenticates their e-mail address

Parameters

string $providerName

Returns

string

redirectedAction()

redirectedAction() 

Action that is called when social provider redirects back to the application after validating user e-mail

getRedirectUrl()

getRedirectUrl(string  $action) : false|string

Get the social providers entry URL

Parameters

string $action

defined in SocialManager as flag to choose logic flow

Returns

false|string —

the redirect URL