Copied!

OAuth - OAuth2 authentication wrapper class.

Uses the oauth2-client package from the League of Extraordinary Packages.

CloneableInstantiable
Methods
public __construct( $options)
 

OAuth constructor.

  • param array $options Associative array containing provider, userName, clientSecret, clientId and refreshToken elements
public getOauth64()
 

Generate a base64-encoded OAuth token.

  • return string
Properties
protected $oauthClientId = ''
 

The client ID, generated in the app definition of the service you're connecting to.

  • var string
protected $oauthClientSecret = ''
 

The client secret, generated in the app definition of the service you're connecting to.

  • var string
protected $oauthRefreshToken = ''
 

The refresh token, used to obtain new AccessTokens.

  • var string
protected $oauthToken = NULL
 

The current OAuth access token.

  • var \AccessToken
protected $oauthUserEmail = ''
 

The user's email address, usually used as the login ID and also the from address when sending email.

  • var string
protected $provider = NULL
 

An instance of the League OAuth Client Provider.

  • var \AbstractProvider
Methods
protected getGrant()
 

Get a new RefreshToken.

  • return \RefreshToken
protected getToken()
 

Get a new AccessToken.

  • return \AccessToken
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration