Download the PHP package doccheck/oauth2-doccheck without Composer
On this page you can find all versions of the php package doccheck/oauth2-doccheck. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download doccheck/oauth2-doccheck
More information about doccheck/oauth2-doccheck
Files in doccheck/oauth2-doccheck
Package oauth2-doccheck
Short Description DocCheck OAuth 2.0 Client Provider for The PHP League OAuth2-Client
License MIT
Informations about the package oauth2-doccheck
DocCheck Provider for OAuth 2.0 Client
This package provides DocCheck OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
To install, use composer:
Usage
Usage is the same as The League's OAuth client, using \Doccheck\OAuth2\Client\Provider\Doccheck as the provider.
Configuration
When initializing the provider, you can pass the following options:
| Option | Type | Description |
|---|---|---|
clientId |
string |
Your DocCheck Client ID. |
clientSecret |
string |
Your DocCheck Client Secret. |
redirectUri |
string |
The URL to redirect back to after authorization. Must match exactly (see below). |
stateless |
bool |
Set to true if your client has a basic license or to disable the state parameter (defaults to false). |
authorizationLanguage |
Language |
The language for the authorization page. (defaults to Language::EN). |
[!IMPORTANT]
Redirect URL must match exactly!
TheredirectUriprovided in the configuration must be identical to the one you have configured in the DocCheck CPH (Client Control Center).
Common mistakes that cause errors:
- Missing/Extra
www:https://example.comis NOT the same ashttps://www.example.com.- Missing/Extra trailing slash:
https://example.com/callbackis NOT the same ashttps://example.com/callback/.- Different Protocol:
httpis NOT the same ashttps.
Authorization Code Flow
Resource Owner
The getResourceOwner method returns a DoccheckResourceOwner instance which provides the following methods:
getId(): The unique DocCheck user ID.getEmail(): The user's email address.- [...]
toArray(): Returns all available user data as an array.
Note: Availability of data depends on the requested scopes and the user's DocCheck account.
Testing
License
The MIT License (MIT).