diff --git a/src/HanyuuContext.php b/src/HanyuuContext.php index 3af9052..635fa8f 100644 --- a/src/HanyuuContext.php +++ b/src/HanyuuContext.php @@ -89,7 +89,7 @@ class HanyuuContext { }); $routingCtx->register(new OAuth2\OAuth2Routes( - $this->scopeTo('oauth2'), + $this->config->scopeTo('oauth2'), $this->oauth2Ctx, $this->appsCtx, $this->templating, diff --git a/src/OAuth2/OAuth2AuthoriseData.php b/src/OAuth2/OAuth2AuthoriseData.php index deb5d87..2757e59 100644 --- a/src/OAuth2/OAuth2AuthoriseData.php +++ b/src/OAuth2/OAuth2AuthoriseData.php @@ -72,7 +72,7 @@ class OAuth2AuthoriseData { throw new RuntimeException('Insufficient data to do authorisation request lookup.'); $args = 0; - $stmt = $this->cache->get('SELECT auth_id, app_id, user_id, uri_id, auth_state, auth_challenge_code, auth_challenge_method, auth_scope, auth_code, auth_approval, UNIX_TIMESTAMP(auth_created) FROM hau_oauth2_authorise WHERE ' . implode(' AND ', $selectors)); + $stmt = $this->cache->get('SELECT auth_id, app_id, user_id, uri_id, auth_state, auth_challenge_code, auth_challenge_method, auth_scope, auth_code, auth_approval, UNIX_TIMESTAMP(auth_created), UNIX_TIMESTAMP(auth_expires) FROM hau_oauth2_authorise WHERE ' . implode(' AND ', $selectors)); foreach($values as $value) $stmt->addParameter(++$args, $value); $stmt->execute();