2017 © Pedro Peláez
 

library langley

PHP server implementation of Brent Shaffer's OAuth2 framework.

image

simplifie/langley

PHP server implementation of Brent Shaffer's OAuth2 framework.

  • Friday, February 12, 2016
  • by prezire
  • Repository
  • 0 Watchers
  • 0 Stars
  • 8 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Simplifie Langley

PHP server implementation of Brent Shaffer's OAuth2 Framework., (*1)

Installation

Install it via composer using the following terminal command:, (*2)

composer require simplifie/langley

Usage

Use it as a library for native PHP code or your framework of choice such as CodeIgniter:, (*3)

use simplifie\OAuth2Server;

require_once 'vendor/autoload.php';
new OAuth2Server();

$config['composer_autoload'] = FCPATH . 'vendor/autoload.php';
$this->load->library('oauth2server');

Note: This will also install Brent Shaffer's OAuth2 framework as a requirement., (*4)

Sample cURL Calls

Authorize Endpoint

To show a UI, issue a GET request using, (*5)

curl "/authorize&response_type=code&client_id=CLIENT_ID&state=XYZ"

To get an authorization code, issue a request using, (*6)

curl -d "authorized=yes" "/authorize?response_type=code&client_id=testclient&state=xyz"

Resource Endpoint

To evaluate a given token, issue a request using, (*7)

curl "/resource" -d 'access_token=TOKEN'

Token Endpoint

curl -u CLIENT_ID:CLIENT_PWD -d "grant_type=client_credentials" "/token?scope=user_create%20user_read"
curl -u CLIENT_ID:CLIENT_PWD -d 'grant_type=password&username=USERNAME&password=PASSWORD' "/token"

To use the authorized code and acquire a REFRESH_TOKEN, issue a request using, (*8)

curl -u CLIENT_ID:CLIENT_PWD -H "Content-Type: application/x-www-form-urlencoded" -d 'grant_type=authorization_code&code=CODE&redirect_uri=REDIRECT_URI' "/token"
curl -u CLIENT_ID:CLIENT_PWD -H "Content-Type: application/x-www-form-urlencoded" -d 'grant_type=refresh_token&refresh_token=REFRESH_TOKEN' "/token"

Contributor

Special Thanks

Stay Tuned

  • Langley Framework which, includes DB migration, CRUD for clients (applications), users and scopes.

The Versions

12/02 2016

dev-master

9999999-dev

PHP server implementation of Brent Shaffer's OAuth2 framework.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

12/02 2016

1.0.9

1.0.9.0

PHP server implementation of Brent Shaffer's OAuth2 framework.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

12/02 2016

1.0.8

1.0.8.0

PHP server implementation of Brent Shaffer's OAuth2 framework.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

12/02 2016

1.0.7

1.0.7.0

PHP server implementation of Brent Shaffer's OAuth2 framework.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

11/02 2016

1.0.6

1.0.6.0

Server implementation for PHP OAuth2 framework created by Brent Shaffer.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

11/02 2016

1.0.5

1.0.5.0

Server implementation for PHP OAuth2 framework created by Brent Shaffer.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

11/02 2016

1.0.3

1.0.3.0

Server implementation for PHP OAuth2 framework created by Brent Shaffer.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

11/02 2016

1.0.4

1.0.4.0

Server implementation for PHP OAuth2 framework created by Brent Shaffer.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

11/02 2016

1.0.2

1.0.2.0

Server implementation for PHP OAuth2 framework created by Brent Shaffer.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

11/02 2016

1.0.1

1.0.1.0

Server implementation for PHP OAuth2 framework created by Brent Shaffer.

  Sources   Download

MIT

The Requires

 

by Mark Amoin

11/02 2016

1.0.0

1.0.0.0

Server implementation for PHP OAuth2 framework created by Brent Shaffer.

  Sources   Download

MIT

The Requires

 

by Mark Amoin