定制 teltek/oauth2-oracle-access-manager 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

teltek/oauth2-oracle-access-manager

Composer 安装命令:

composer require teltek/oauth2-oracle-access-manager

包简介

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

README 文档

README

This bundle is deprecated and only works for PuMuKIT v2.7 or lower.

To use PuMuKIT v3 or greater install the new bundle: PumukitOAuth2Bundle

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.

Installation

To install, use composer:

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.

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:

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

统计信息

  • 总下载量: 55
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 9
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2017-03-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固