2017 © Pedro Peláez
 

library oauth2-oracle-access-manager

Oracle access manager OAuth 2.0 Client Provider for The PHP League OAuth2-Client

image

teltek/oauth2-oracle-access-manager

Oracle access manager OAuth 2.0 Client Provider for The PHP League OAuth2-Client

  • Wednesday, January 24, 2018
  • by rubenrua
  • Repository
  • 8 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Deprecated

This bundle is deprecated and only works for PuMuKIT v2.7 or lower., (*1)

To use PuMuKIT v3 or greater install the new bundle: PumukitOAuth2Bundle, (*2)

Oracle Access Manager Provider for OAuth 2.0 Client

This package provides Oracle Access Manager OAuth 2.0 support for the PHP League's OAuth 2.0 Client., (*3)

Installation

To install, use composer:, (*4)

composer require teltek/oauth2-oracle-access-manager

Usage

Usage is the same as The League's OAuth client, using Teltek\Oauth2OracleAccessManagerBundle\Provider\Oam as the provider., (*5)

Authorization Code Flow

$provider = new Teltek\Oauth2OracleAccessManagerBundle\Provider\Oam(
    'clientId' => 'your client id',
    'clientSecret' => 'your client secret',
    'redirectUri' => 'your redirect uri',
    'urlAuthorize' => 'your url authorize',
    'urlAccessToken' => 'your url access token',
    'urlResourceOwnerDetails' => 'your url resource owner details',
]);

if (!isset($_GET['code'])) {
    $options['scope'] = array('Customer.Info','UserProfile.me');
    $authorizationUrl = $provider->getAuthorizationUrl($options);

    $_SESSION['oauth2state'] = $provider->getState();

    header('Location: '.$authorizationUrl);
    exit;

} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
    unset($_SESSION['oauth2state']);
    exit('Invalid state');
} else {

    try {
        $accessToken = $provider->getAccessToken('authorization_code',['code' => $_GET['code']]);

        $resourceOwner = $provider->getResourceOwner($accessToken);

        ...
    }  catch (IdentityProviderException $e) {
        exit($e->getMessage());
    }

Scopes

If you want send different scopes you must edit:, (*6)

$options['scope'] = array('Customer.Info','UserProfile.me');

The Versions

24/01 2018

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/teltek/oauth2-oracle-access-manager

Oracle access manager OAuth 2.0 Client Provider for The PHP League OAuth2-Client

  Sources   Download

proprietary Copyright

The Requires

 

The Development Requires

symfony2 client oauth2 oracle teltek oracle access manager

24/01 2018

dev-master

9999999-dev https://github.com/teltek/oauth2-oracle-access-manager

Oracle access manager OAuth 2.0 Client Provider for The PHP League OAuth2-Client

  Sources   Download

proprietary Copyright

The Requires

 

The Development Requires

symfony2 client oauth2 oracle teltek oracle access manager

02/03 2017

1.0.0

1.0.0.0 https://github.com/teltek/oauth2-oracle-access-manager

Oracle access manager OAuth 2.0 Client Provider for The PHP League OAuth2-Client

  Sources   Download

Copyright

The Requires

 

The Development Requires

symfony2 client oauth2 oracle teltek oracle access manager