Download the PHP package znerol/oauth2-server-storeauth-grant without Composer
On this page you can find all versions of the php package znerol/oauth2-server-storeauth-grant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download znerol/oauth2-server-storeauth-grant
More information about znerol/oauth2-server-storeauth-grant
Files in znerol/oauth2-server-storeauth-grant
Package oauth2-server-storeauth-grant
Short Description Google Billing / Apple StoreKit OAuth2 Grant Extension for PHP OAuth 2.0 Server
License MIT
Informations about the package oauth2-server-storeauth-grant
Google Billing / Apple StoreKit OAuth2 Grant Extension for PHP OAuth 2.0 Server
An OAuth 2 extension grant which validates a Google Billing purchase or an Apple StoreKit transaction and returns an access token restricted to the specified SKU/product.
Dependencies
Some PSR-18 HTTP client.
Flow (Android Billing)
The client sends a POST request with following body parameters to the authorization server:
grant_type
with the valueurn:uuid:ea31e77f-cb72-486f-b5c4-deef43e839f3
client_id
with the client’s IDscope
with a space-delimited list of requested scope permissionspurchase_token
with the android billing purchase token
The authorization server will respond with a JSON object containing the following properties:
token_type
with the valueBearer
expires_in
with an integer representing the TTL of the access tokenaccess_token
a JWT signed with the authorization server’s private key
Flow (Apple StoreKit)
The client sends a POST request with following body parameters to the authorization server:
grant_type
with the value:urn:uuid:c7e545a5-d72b-4294-a173-bb1858aae099
client_id
with the client’s IDscope
with a space-delimited list of requested scope permissionstransaction_id
with the StoreKit transaction id
The authorization server will respond with a JSON object containing the following properties:
token_type
with the valueBearer
expires_in
with an integer representing the TTL of the access tokenaccess_token
a JWT signed with the authorization server’s private key
Setup
Wherever you initialize your objects, initialize a new instance of the authorization server and bind the storage interfaces and authorization code grant:
For google non-consumables:
For apple non-consumables:
License
All versions of oauth2-server-storeauth-grant with dependencies
league/oauth2-server Version ^8.3
php Version ^8.2
psr/http-client Version ^1.0
psr/http-factory Version ^1.0