2017 © Pedro Peláez
 

library oktasdk

PHP client library for the Okta API (v1)

image

dakkusingh/oktasdk

PHP client library for the Okta API (v1)

  • Friday, May 11, 2018
  • by dakkusingh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 696 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 21 Versions
  • 709 % Grown

The README.md

OktaSDK-PHP

Latest Stable Version Total Downloads License Build Status, (*1)

PHP client library for the Okta API (v1), (*2)

Refer to the full Okta API documentation for more complete information on each resource/component., (*3)

Install with Composer

composer require dakkusingh/oktasdk

Initializing the Client

To initialize the client object you must pass in your Okta organization subdomain and API key as parameters. For example, if your Okta domain is https://foo.okta.com, your org prefix is foo. For instructions on how to get an API key for your organization, see Obtaining a token., (*4)

Example:

use Okta;

$okta = new Okta\Client('foo', 'api_key');

You may also optionally pass an array of config options as the third argument:, (*5)

$okta = new Okta\Client('foo', 'api_key', [
    'bootstrap' => false, // Don't auto-bootstrap the Okta resource properties
    'preview'   => true,  // Use the okta preview (oktapreview.com) domain
    'headers'   => [
        'Some-Header'    => 'Some value',
        'Another-Header' => 'Another value'
    ]
]);

Usage

All Okta resources are available via the $okta->$resource->$method syntax where $resource is the lower case, singular name of the resource (i.e. - Users = user, Groups = group, etc.) and $method is the method name (see the docs for all available methods). The only exception being the Authentication resource for which the method name is auth (because authentication is just too long)., (*6)

Example:

// Get a user by ID
$user = $okta->user->get('jpinkerton');

// Add user to a group
$group = $okta->group->addUser($someGroupId, $user->id);

// Get a user's apps
$userApps = $okta->user->apps($user->id);

Handling Exceptions

use Okta;

try {
    $user = $okta->user->get('jpinkerton');
} catch (Okta\Exception as $e) {
    return $e->getErrorSummary();
}

See documentation for available exception methods., (*7)

Contributing

  1. Fork the repository, (*8)

  2. Clone your fork:, (*9)

    bash git clone git@github.com:your-username/oktasdk-php.git # NOTE: Be sure to use your fork's repository URL, (*10)

  3. In your local copy, create a branch:, (*11)

    bash git checkout -b descriptive-branch-name', (*12)

  4. Make your changes, (*13)

  5. Commit your changes:, (*14)

    bash git commit -m "Your commit notes here" # NOTE: Be descriptive with your commit notes, (*15)

  6. Push your branch:, (*16)

    bash git push origin descriptive-branch-name, (*17)

  7. Open a Pull Request on GitHub., (*18)

This project is liscensed under the MIT License., (*19)

The Versions

11/05 2018

dev-master

9999999-dev

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dakku Singh

api sdk okta

07/12 2017

1.2.11

1.2.11.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

22/03 2017

1.2.10

1.2.10.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

14/11 2016

1.2.9

1.2.9.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

14/11 2016

1.2.8

1.2.8.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

11/10 2016

1.2.7

1.2.7.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

14/09 2016

1.2.6

1.2.6.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

13/09 2016

1.2.5

1.2.5.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

02/09 2016

1.2.4

1.2.4.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

22/04 2016

1.2.3

1.2.3.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

22/04 2016

1.2.2

1.2.2.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

22/04 2016

1.2.1

1.2.1.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

13/04 2016

1.2.0

1.2.0.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

12/04 2016

1.1.0

1.1.0.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

05/04 2016

1.0.0

1.0.0.0

PHP client library for the Okta API (v1)

  Sources   Download

MIT

The Requires

 

The Development Requires

api sdk okta

04/04 2016

1.0.0-beta.6

1.0.0.0-beta6

PHP client library for the Okta API (v1)

  Sources   Download

proprietary

The Requires

 

The Development Requires

api sdk okta

30/03 2016

1.0.0-beta.5

1.0.0.0-beta5

PHP client library for the Okta API (v1)

  Sources   Download

proprietary

The Requires

 

The Development Requires

api sdk okta

30/03 2016

1.0.0-beta.4

1.0.0.0-beta4

PHP client library for the Okta API (v1)

  Sources   Download

proprietary

The Requires

 

The Development Requires

api sdk okta

29/03 2016

1.0.0-beta.3

1.0.0.0-beta3

PHP client library for the Okta API (v1)

  Sources   Download

proprietary

The Requires

 

The Development Requires

api sdk okta

22/03 2016

1.0.0-beta.2

1.0.0.0-beta2

PHP client library for the Okta API (v1)

  Sources   Download

proprietary

The Requires

 

The Development Requires

api sdk okta

22/03 2016

1.0.0-beta.1

1.0.0.0-beta1

PHP client library for the Okta API (v1)

  Sources   Download

proprietary

The Requires

 

The Development Requires

api sdk okta