Download the PHP package ominity/oauth2-ominity-php without Composer
On this page you can find all versions of the php package ominity/oauth2-ominity-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ominity/oauth2-ominity-php
More information about ominity/oauth2-ominity-php
Files in ominity/oauth2-ominity-php
Package oauth2-ominity-php
Short Description Ominity Provider for OAuth 2.0 Client
License BSD-2-Clause
Homepage https://github.com/ominity/oauth2-ominity-php
Informations about the package oauth2-ominity-php
Ominity OAuth in PHP
This package provides Ominity OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Use Ominity OAuth to easily connect Ominity User & Admin accounts to your application.
Installation
By far the easiest way to install the Ominity API client is to require it with Composer.
$ composer require ominity/oauth2-ominity-php ^1.0
{
"require": {
"ominity/oauth2-ominity-php": "^1.0"
}
}
You may also git checkout or download all the files, and include the OAuth 2.0 provider manually.
Usage
Usage is the same as The League's OAuth client, using \Ominity\OAuth2\Client\Provider\Ominity
as the provider.
Authorization Code Flow
Refreshing A Token
Authenticating using the AccessToken (ominity-api-php example)
After refreshing an AccessToken, here's how to use it with the ominity-api-php package. Note that the getToken()
method is used to obtain the access token string.
[!NOTE] In order to access the ominity api via
\Ominity\Api\OminityApiClient
, the ominity/ominity-api-php library is required!
Revoking a token
Both AccessTokens and RefreshTokens are revokable. Here's how to revoke an AccessToken:
Similarly, here's how to revoke a RefreshToken:
Note: When you revoke a refresh token, all access tokens based on the same authorization grant will be revoked as well.
Want to help us make our API client even better?
Want to help us make our API client even better? We take pull requests.
License
BSD (Berkeley Software Distribution) License. Copyright (c) 2024, Ominity.
Support
Contact: www.ominity.com — [email protected]