2017 © Pedro Peláez
 

library ez-jwt

ez-jwt allows you to create JWT tokens for Server2Server authentication on the Google APIs and can be modified to work with other OAuth Services

image

cmtz/ez-jwt

ez-jwt allows you to create JWT tokens for Server2Server authentication on the Google APIs and can be modified to work with other OAuth Services

  • Tuesday, June 23, 2015
  • by cmtz
  • Repository
  • 2 Watchers
  • 2 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ez-jwt

Simple OAuth Tools, (*1)

Install

composer require cmtz/ez-jwt, (*2)

How to Use ez-jwt

Parameters

$issuer = your@developer.gserviceaccount.com; //this would be the email issued via Google API console (Credentials)
$audience = "https://www.googleapis.com/oauth2/v3/token"; //for google jwt this is what would default
$scope = "https://www.googleapis.com/auth/content"; //for google jwt this is what would default
$key = file_get_contents(yourkeyfile.priv);
$algorithm = 'RS256'; //as of now only RS256 is supported using ez-jwt
$grant = 'urn:ietf:params:oauth:grant-type:jwt-bearer'; //for google jwt this is what would default
$APIurl = 'https://www.googleapis.com/oauth2/v3/token'; //for google jwt this is what would default
$headers = array('Content-Type' => 'application/x-www-form-urlencoded'); //this does not need to be set as it will default to what is needed but can be set to something else if needed

Calling ezjwt

$token = ezjwt::generateToken($issuer, $audience, $scope, $key, $algorithm, $grant, $APIurl, $headers)

The Versions

23/06 2015

dev-master

9999999-dev

ez-jwt allows you to create JWT tokens for Server2Server authentication on the Google APIs and can be modified to work with other OAuth Services

  Sources   Download

The Requires