Download the PHP package onelogin/api without Composer
On this page you can find all versions of the php package onelogin/api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package api
OneLogin PHP SDK
This SDK will let you execute all the API methods, version/1, described at https://developers.onelogin.com/api-docs/1/getting-started/dev-overview.
Installation
Hosting
Github
The toolkit is hosted on github. You can download it from:
- Lastest release: https://github.com/onelogin/onelogin-php-sdk/releases/latest
- Master repo: https://github.com/onelogin/onelogin-php-sdk/tree/master
Composer
The toolkit supports composer. You can find the onelogin/api
package at https://packagist.org/packages/onelogin/api
In order to import the sdk into your current php project, execute
Dependencies
The SDK has the following dependencies:
- PHP >5.6
- guzzle
Getting started
You'll need a OneLogin account and a set of API credentials before you get started.
If you don't have an account you can sign up for a free developer account here.
client_id | Required: A valid OneLogin API client_id |
client_secret | Required: A valid OneLogin API client_secret |
region | Optional: us or eu . Defaults to us |
For all methods see PHPdoc of this SDK published at: https://onelogin.github.io/onelogin-php-sdk/index.html
Usage
Errors and exceptions
OneLogin's API can return 400, 401, 403 or 404 when there was any issue executing the action. When that happens, the methods of the SDK will include error and errorMessage in the OneLoginClient. Use the getError() and the getErrorDescription() to retrieve them.
In some scenarios there is an attribute not provided or invalid that causes the error on the execution of the API call, when that happens at the OneLoginClient there is available a getErrorAttribute() method that contains the name of the attribute that caused the issue. See the API documentation to verify when this data is provided by the API.
Authentication
By default methods call internally to getAccessToken
if there is no valid accessToken. You can also get tokens etc directly if needed.
Searchs
By default a search (getUsers, getEvents, getRoles, getGroups) will return a max of results determined by the client parameter maxResults (1000), but the search accept this parameter to get a different number of results. The max_results attribute of the client can be also overriden.
Available Methods
Development
After checking out the repo, run composer install
to install dependencies. Then, cd tests
and phpunit .
to run the tests.
To release a new version, update the version number of the composer.json
and commit it, then you will be able to update it to composer, creating a previously a new tag on github.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/onelogin/onelogin-php-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the OneLogin PHP SDK project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
All versions of api with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0