Documentation

Twitter extends SocialLogin
in package

Defines the methods to be implemented by each social login platform.

Table of Contents

Methods

__construct()  : mixed
get()  : self
Returns a SocialLogin class of the given derived type.
getLoginType()  : string
Provides the canonical name of the platform to use in string comparison.
getLoginUrl()  : string
Returns the URL to authenticate with the social platform.
login()  : SocialIdentity
Authenticates with the social platform.
getRedirectUrl()  : string
Returns the URL that the social platform will redirect to after authentication.
getSessionToken()  : array<string, string>
getTwitterObj()  : TwitterOAuth
validateToken()  : array<string, string>

Methods

get()

Returns a SocialLogin class of the given derived type.

public static get(string $loginType) : self
Parameters
$loginType : string
Return values
self

getLoginType()

Provides the canonical name of the platform to use in string comparison.

public static getLoginType() : string
Return values
string

getLoginUrl()

Returns the URL to authenticate with the social platform.

public getLoginUrl() : string
Return values
string

getRedirectUrl()

Returns the URL that the social platform will redirect to after authentication.

protected getRedirectUrl() : string
Return values
string

getSessionToken()

private getSessionToken() : array<string, string>
Return values
array<string, string>

getTwitterObj()

private static getTwitterObj([array<string, string>|null $token = null ]) : TwitterOAuth
Parameters
$token : array<string, string>|null = null
Return values
TwitterOAuth

validateToken()

private static validateToken(array<string|int, mixed> $token) : array<string, string>
Parameters
$token : array<string|int, mixed>
Return values
array<string, string>

        
On this page

Search results