PHP Class Webiny\Component\OAuth2\Bridge\OAuth2

Inheritance: use trait Webiny\Component\StdLib\StdLibTrait
Show file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
getInstance ( string $clientId, string $clientSecret, string $redirectUri, string $certificateFile = '' ) : AbstractOAuth2 Create an instance of an OAuth2 driver.
getLibrary ( ) : string Get the name of bridge library which will be used as the driver.
setLibrary ( string $pathToClass ) Change the default library used for the driver.

Method Details

getInstance() static public method

Create an instance of an OAuth2 driver.
static public getInstance ( string $clientId, string $clientSecret, string $redirectUri, string $certificateFile = '' ) : AbstractOAuth2
$clientId string Client id.
$clientSecret string Client secret.
$redirectUri string Target url where to redirect after authentication.
$certificateFile string
return AbstractOAuth2

getLibrary() static public method

Get the name of bridge library which will be used as the driver.
static public getLibrary ( ) : string
return string

setLibrary() static public method

Change the default library used for the driver.
static public setLibrary ( string $pathToClass )
$pathToClass string Path to the new bridge class. The class must implement \Webiny\Component\OAuth2\Bridge\OAuth2Interface.