summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-07-01 08:52:51 -0700
committerAaron Parecki <aaron@parecki.com>2017-07-01 08:52:51 -0700
commit6533bdf052ac04c4b6bd0608efdbe88d91fd02df (patch)
treed6fe2f4c73fb02043508fa2c9bf81c67610ce15d /controllers
parent88d8392d1ecb8f95346fd3e636627b60680fb652 (diff)
update packages
fixes relative URL resolution (closes #78) by relying on new IndieAuth\Client package.
Diffstat (limited to 'controllers')
-rw-r--r--controllers/auth.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/controllers/auth.php b/controllers/auth.php
index a8811c3..299bde2 100644
--- a/controllers/auth.php
+++ b/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);