Download the PHP package tomsommer/oauth2-onpay without Composer
On this page you can find all versions of the php package tomsommer/oauth2-onpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomsommer/oauth2-onpay
More information about tomsommer/oauth2-onpay
Files in tomsommer/oauth2-onpay
Package oauth2-onpay
Short Description OnPay.io OAuth 2.0 provider client for the PHP League's OAuth 2.0 Client
License MIT
Homepage https://github.com/tomsommer/oauth2-onpay
Informations about the package oauth2-onpay
OnPay Provider for the PHP League's OAuth 2.0 Client
This package provides OnPay.io OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
Usage
Usage is the same as the League's OAuth client, using TomSommer\OAuth2\Client\Provider\OnPay as the provider.
Authorization Code Flow
Refreshing a token
OnPay may leave refresh_token out of a refresh response, which per RFC 6749 §6 means the old one remains valid. Keep it rather than overwriting it with null:
PKCE
PKCE is supported and off by default, because the verifier has to survive the redirect and only the calling application can store it:
Options
| Option | Default | Description |
|---|---|---|
clientId |
required | Your integration's identifier. OnPay recommends the domain the integration runs on. |
redirectUri |
required | Where OnPay sends the merchant back to. |
gatewayId |
null |
Scopes authorization to one gateway. Uppercase alphanumeric; older gateway ids are numeric. |
baseAuthorizeUri |
https://manage.onpay.io |
Authorization host. |
baseUri |
https://api.onpay.io |
API host, which also serves the token endpoint. |
pkceMethod |
null |
Set to S256 to enable PKCE. |
Things to know about OnPay's OAuth
- There is no client secret. OnPay issues public clients, so
clientSecretis left unset and the token request carries an empty one. - There is no resource owner endpoint. An access token authorizes a gateway, not a person, so
getResourceOwner()andgetResourceOwnerDetailsUrl()throwBadMethodCallExceptionrather than pretending otherwise. There is likewise noACCESS_TOKEN_RESOURCE_OWNER_ID. - Only the authorization code and refresh token grants are supported.
- The scope is
full, which is the only scope OnPay defines.
API client
This package handles authorization only. For the OnPay API itself, see tomsommer/onpay-php-sdk, which uses this provider.
Testing
License
The MIT License (MIT). See LICENSE.