8000 GitHub - compwright/oauth2-domo at v1.0.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

compwright/oauth2-domo

Repository files navigation

Domo Provider for OAuth 2.0 Client

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

This package provides Domo OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Installation

To install, use composer:

composer require compwright/oauth2-domo

Usage

Usage is the same as The League's OAuth client, using \Compwright\OAuth2\Domo\DomoProvider as the provider.

Client Credentials Code Flow

$provider = new \Compwright\OAuth2\Domo\DomoProvider([
    'clientId'          => '{domo-client-id}',
    'clientSecret'      => '{domo-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url',
]);

// Try to get an access token (using the authorization code grant)
$token = $provider->getAccessToken('client_credentials');

// We got an access token, let's now get the user's details
$user = $provider->getResourceOwner($token);

// Use these details to create a new profile
printf('Hello %s!', $user->getNickname());

// Use this to interact with an API on the users behalf
echo $token->getToken();

Testing

$ make test

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Domo Provider for the OAuth 2.0 Client

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • PHP 98.4%
  • Makefile 1.6%
0