PHP Classes

PHP OAuth2 Server Library: Implements an API provider using OAuth 2 protocol

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 82 All time: 10,082 This week: 45Up
Version License PHP version Categories
oauth2server 1.0.8BSD License5Networking, PHP 5, Web services
Description 

Author

This package implements an API provider using OAuth 2 protocol.

It provides several classes that perform several tasks to implement a PHP API that processes HTTP requests that follow the OAuth 2 protocol.

Currently, it can:

- Implement the OAuth 2 dialog to provide an access token to API clients

- Can be configured to associate API URL patterns to API call handler classes

- Provides a base class that can be extended to implement new API call handler classes with less development effort

- Calls an authorization class that can implement custom authentication of API users that can be integrated with any user management system

- Provides an API maintenance mode that allows suspending the access of an API to perform maintenance activities

- Provides an API error handling class that allows developers to customize the actions that will be performed when an API error happens

- The presentation of API dialog pages can be customized using templates organized in themes

Picture of Manuel Lemos
  Performance   Level  
Name: Manuel Lemos <contact>
Classes: 45 packages by
Country: Portugal Portugal

Example

<?php
/*
 * api.php
 *
 * @(#) $Id: $
 *
 */

   
define('APPLICATION_PATH', '..');

    require(
APPLICATION_PATH.'/vendor/autoload.php');

   
$options = new oauth2_server_configuration_options_class;
   
$options->application_path = APPLICATION_PATH;
   
$options->initialize();

    if(
$options->maintenance)
       
$case = new oauth2_server_maintenance_class;
    else
       
$case = new oauth2_server_api_class;
   
$case->options = $options;
    if((
$success = $case->initialize()))
       
$success = $case->finalize($case->process());
    if(
$case->exit)
        exit;
    if(
$success)
       
$case->output();
    else
    {
       
$error_case = new oauth2_server_error_class;
       
$error_case->options = $options;
       
$error_case->error = $case->error;
       
$error_case->web = false;
       
$error_case->api = true;
        if(
$error_case->initialize()
        &&
$error_case->finalize($error_case->process()))
           
$error_case->output();
    }
?>


  Files folder image Files (32)  
File Role Description
Files folder imageconfiguration (3 files, 1 directory)
Files folder imagetemplates (4 files, 1 directory)
Files folder imageusecases (11 files, 1 directory)
Files folder imagevendor (2 files)
Files folder imageweb (3 files, 1 directory)
Accessible without login Plain text file .distribution Data Auxiliary data

  Files folder image Files (32)  /  configuration  
File Role Description
Files folder imagelocale (1 directory)
  Accessible without login Plain text file .distribution Data Auxiliary data
  Accessible without login Plain text file classmaps.php Aux. Auxiliary script
  Plain text file configuration.php Class Class source

  Files folder image Files (32)  /  configuration  /  locale  
File Role Description
Files folder imageen (5 files)

  Files folder image Files (32)  /  configuration  /  locale  /  en  
File Role Description
  Accessible without login Plain text file authorization.php Aux. Auxiliary script
  Accessible without login Plain text file common.php Aux. Auxiliary script
  Accessible without login Plain text file error.php Aux. Auxiliary script
  Accessible without login Plain text file maintenance.php Aux. Auxiliary script
  Accessible without login Plain text file token.php Aux. Auxiliary script

  Files folder image Files (32)  /  templates  
File Role Description
Files folder imagetheme (1 directory)
  Accessible without login Plain text file .distribution Data Auxiliary data
  Accessible without login Plain text file classmaps.php Aux. Auxiliary script
  Plain text file debug.php Class Class source
  Plain text file page.php Class Class source

  Files folder image Files (32)  /  templates  /  theme  
File Role Description
Files folder imagedefault (1 file)

  Files folder image Files (32)  /  templates  /  theme  /  default  
File Role Description
  Accessible without login HTML file template.html Doc. Documentation

  Files folder image Files (32)  /  usecases  
File Role Description
Files folder imageexample (1 file)
  Accessible without login Plain text file .distribution Data Auxiliary data
  Accessible without login Plain text file classmaps.php Aux. Auxiliary script
  Plain text file oauth2_server_api.php Class Class source
  Plain text file oauth2_server_authorization.php Class Class source
  Plain text file oauth2_server_authorization_dialog.php Class Class source
  Plain text file oauth2_server_error.php Class Class source
  Plain text file oauth2_server_handler_default.php Class Class source
  Plain text file oauth2_server_login_dialog.php Class Class source
  Plain text file oauth2_server_maintenance.php Class Class source
  Plain text file oauth2_server_token.php Class Class source
  Plain text file oauth2_server_user_validation.php Class Class source

  Files folder image Files (32)  /  usecases  /  example  
File Role Description
  Plain text file auth2_server_api_example_user.php Class Class source

  Files folder image Files (32)  /  vendor  
File Role Description
  Accessible without login Plain text file autoload.php Aux. Auxiliary script
  Accessible without login Plain text file classmaps.php Aux. Auxiliary script

  Files folder image Files (32)  /  web  
File Role Description
Files folder imagecss (1 directory)
  Accessible without login Plain text file api.php Example Example script
  Accessible without login Plain text file authorization.php Example Example script
  Accessible without login Plain text file token.php Example Example script

  Files folder image Files (32)  /  web  /  css  
File Role Description
Files folder imagetheme (1 directory)

  Files folder image Files (32)  /  web  /  css  /  theme  
File Role Description
Files folder imagedefault (1 file)

  Files folder image Files (32)  /  web  /  css  /  theme  /  default  
File Role Description
  Accessible without login Plain text file styles.css Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:82
This week:0
All time:10,082
This week:45Up