Browse Source

update packages

fixes relative URL resolution (closes #78) by relying on new IndieAuth\Client package.
pull/82/head
Aaron Parecki 8 years ago
parent
commit
6533bdf052
No known key found for this signature in database GPG Key ID: 276C2817346D6056
  1. 2
      composer.json
  2. 65
      composer.lock
  3. 10
      controllers/auth.php

2
composer.json

@ -3,7 +3,7 @@
"slim/slim": "2.2.*",
"saltybeagle/savant3": "dev-master",
"j4mie/idiorm": "1.4.*",
"mf2/mf2": "0.3.*",
"mf2/mf2": "^0.3.2",
"indieweb/date-formatter": "0.3.*",
"indieauth/client": ">=0.2.0",
"mpratt/relativetime": ">=1.0",

65
composer.lock

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "ea8898cc230a54e15b78444d0454961e",
"content-hash": "bb7207a1208cf0bb8877ca18f8a1fe65",
"packages": [
{
"name": "abraham/twitteroauth",
"version": "0.7.2",
"version": "0.7.4",
"source": {
"type": "git",
"url": "https://github.com/abraham/twitteroauth.git",
"reference": "119d5a83478a2d21c09cd27980ab67eba11c8fe1"
"reference": "c6f9e692552dd037b2324ed0dfa28a4e60875acf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/abraham/twitteroauth/zipball/119d5a83478a2d21c09cd27980ab67eba11c8fe1",
"reference": "119d5a83478a2d21c09cd27980ab67eba11c8fe1",
"url": "https://api.github.com/repos/abraham/twitteroauth/zipball/c6f9e692552dd037b2324ed0dfa28a4e60875acf",
"reference": "c6f9e692552dd037b2324ed0dfa28a4e60875acf",
"shasum": ""
},
"require": {
@ -25,9 +25,9 @@
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpmd/phpmd": "~2.4",
"phpunit/phpunit": "~5.6",
"squizlabs/php_codesniffer": "~2.7"
"phpmd/phpmd": "~2.6",
"phpunit/phpunit": "~5.7",
"squizlabs/php_codesniffer": "~3.0"
},
"type": "library",
"autoload": {
@ -58,20 +58,20 @@
"social",
"twitter"
],
"time": "2016-12-12T17:42:13+00:00"
"time": "2017-06-30T22:02:01+00:00"
},
{
"name": "andreyco/instagram",
"version": "3.4.0",
"version": "3.4.1",
"source": {
"type": "git",
"url": "https://github.com/Andreyco/Instagram-for-PHP.git",
"reference": "8c1b98f601a68142095461c0b8a9498375145e0d"
"reference": "47b322bd3be98ca24f9ca637f14632996dc2e7dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Andreyco/Instagram-for-PHP/zipball/8c1b98f601a68142095461c0b8a9498375145e0d",
"reference": "8c1b98f601a68142095461c0b8a9498375145e0d",
"url": "https://api.github.com/repos/Andreyco/Instagram-for-PHP/zipball/47b322bd3be98ca24f9ca637f14632996dc2e7dc",
"reference": "47b322bd3be98ca24f9ca637f14632996dc2e7dc",
"shasum": ""
},
"require": {
@ -101,7 +101,7 @@
"api",
"instagram"
],
"time": "2016-07-17T23:42:10+00:00"
"time": "2017-04-13T10:32:53+00:00"
},
{
"name": "barnabywalters/mf-cleaner",
@ -145,21 +145,24 @@
},
{
"name": "ezyang/htmlpurifier",
"version": "v4.8.0",
"version": "v4.9.3",
"source": {
"type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2"
"reference": "95e1bae3182efc0f3422896a3236e991049dac69"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2",
"reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/95e1bae3182efc0f3422896a3236e991049dac69",
"reference": "95e1bae3182efc0f3422896a3236e991049dac69",
"shasum": ""
},
"require": {
"php": ">=5.2"
},
"require-dev": {
"simpletest/simpletest": "^1.1"
},
"type": "library",
"autoload": {
"psr-0": {
@ -185,7 +188,7 @@
"keywords": [
"html"
],
"time": "2016-07-16T12:58:58+00:00"
"time": "2017-06-03T02:28:16+00:00"
},
{
"name": "firebase/php-jwt",
@ -278,16 +281,16 @@
},
{
"name": "indieauth/client",
"version": "0.2.0",
"version": "0.2.2",
"source": {
"type": "git",
"url": "https://github.com/indieweb/indieauth-client-php.git",
"reference": "4b9bd766a92b8abbe420f5889bf7ebac7678151d"
"reference": "225ece31ddafaee3348eabdc915422c457498a84"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/indieweb/indieauth-client-php/zipball/4b9bd766a92b8abbe420f5889bf7ebac7678151d",
"reference": "4b9bd766a92b8abbe420f5889bf7ebac7678151d",
"url": "https://api.github.com/repos/indieweb/indieauth-client-php/zipball/225ece31ddafaee3348eabdc915422c457498a84",
"reference": "225ece31ddafaee3348eabdc915422c457498a84",
"shasum": ""
},
"require": {
@ -313,7 +316,7 @@
}
],
"description": "IndieAuth Client Library",
"time": "2017-02-09T23:42:05+00:00"
"time": "2017-07-01T15:43:45+00:00"
},
{
"name": "indieweb/date-formatter",
@ -468,23 +471,25 @@
},
{
"name": "mf2/mf2",
"version": "v0.3.0",
"version": "v0.3.2",
"source": {
"type": "git",
"url": "https://github.com/indieweb/php-mf2.git",
"reference": "4fb2eb5365cbc0fd2e0c26ca748777d6c2539763"
"reference": "dc0d90d4ee30864bcf37cd3a8fc8db94f9134cc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/indieweb/php-mf2/zipball/4fb2eb5365cbc0fd2e0c26ca748777d6c2539763",
"reference": "4fb2eb5365cbc0fd2e0c26ca748777d6c2539763",
"url": "https://api.github.com/repos/indieweb/php-mf2/zipball/dc0d90d4ee30864bcf37cd3a8fc8db94f9134cc4",
"reference": "dc0d90d4ee30864bcf37cd3a8fc8db94f9134cc4",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
"mf2/tests": "@dev",
"phpdocumentor/phpdocumentor": "v2.8.4",
"phpunit/phpunit": "4.8.*"
},
"suggest": {
"barnabywalters/mf-cleaner": "To more easily handle the canonical data php-mf2 gives you"
@ -517,7 +522,7 @@
"parser",
"semantic"
],
"time": "2016-03-14T12:13:34+00:00"
"time": "2017-05-27T15:27:47+00:00"
},
{
"name": "mpratt/relativetime",

10
controllers/auth.php

@ -29,9 +29,9 @@ $app->get('/auth/start', function() use($app) {
$_SESSION['reply'] = $params['reply'];
}
$authorizationEndpoint = Mf2\resolveUrl($me, IndieAuth\Client::discoverAuthorizationEndpoint($me));
$tokenEndpoint = Mf2\resolveUrl($me, IndieAuth\Client::discoverTokenEndpoint($me));
$micropubEndpoint = Mf2\resolveUrl($me, IndieAuth\Client::discoverMicropubEndpoint($me));
$authorizationEndpoint = IndieAuth\Client::discoverAuthorizationEndpoint($me);
$tokenEndpoint = IndieAuth\Client::discoverTokenEndpoint($me);
$micropubEndpoint = IndieAuth\Client::discoverMicropubEndpoint($me);
$defaultScope = 'create update';
@ -185,8 +185,8 @@ $app->get('/auth/callback', function() use($app) {
// An authorization code is in the query string, and we want to exchange that for an access token at the token endpoint.
// Discover the endpoints
$micropubEndpoint = Mf2\resolveUrl($me, IndieAuth\Client::discoverMicropubEndpoint($me));
$tokenEndpoint = Mf2\resolveUrl($me, IndieAuth\Client::discoverTokenEndpoint($me));
$micropubEndpoint = IndieAuth\Client::discoverMicropubEndpoint($me);
$tokenEndpoint = IndieAuth\Client::discoverTokenEndpoint($me);
if($tokenEndpoint) {
$token = IndieAuth\Client::getAccessToken($tokenEndpoint, $params['code'], $params['me'], buildRedirectURI(), Config::$base_url, k($params,'state'), true);

Loading…
Cancel
Save