OAuth2ApplicationAbstract
Subclass for any Application backed by OAuth2.
use Hanaboso\PipesPhpSdk\Authorization\Base\OAuth2\OAuth2ApplicationAbstract;
Inheritance #
ApplicationAbstract -> OAuth2ApplicationAbstract (implements OAuth2ApplicationInterface)
Methods you implement #
In addition to the base methods inherited from ApplicationAbstract:
| Method | Returns | Purpose |
|---|---|---|
getAuthUrl() | string | Provider's authorization endpoint. |
getTokenUrl() | string | Provider's token endpoint. |
getScopes(ApplicationInstall $install) | string[] | Scopes to request during authorization. |
Methods provided #
| Method | Returns | Purpose |
|---|---|---|
getAccessToken(ApplicationInstall $install) | string | Current access token, refreshed by the platform if expired. |
refreshAuthorization(ApplicationInstall $install) | ApplicationInstall | Force refresh; called automatically by the platform. |
getAuthorizationToken(ApplicationInstall $install, string $redirectUrl) | string | Builds the authorize URL the Admin UI redirects the user to. |
setAuthorizationToken(ApplicationInstall $install, array $token) | ApplicationInstall | Stores the token returned by the provider's callback. |
See also #
- Development: OAuth2 Application
- BasicApplicationAbstract
- Node.js equivalent:
AOAuth2Application