aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-08-24 17:14:30 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-08-24 17:17:31 -0400
commit27ba57747ab46c0507acc3a87e5b73babda436b1 (patch)
treebe1a33e1dc581c851838e50de482f076e739a70d
parentde17d5bdcc1cab495b0b3f2d345fa3ac21f3676c (diff)
downloadforums-27ba57747ab46c0507acc3a87e5b73babda436b1.tar
forums-27ba57747ab46c0507acc3a87e5b73babda436b1.tar.gz
forums-27ba57747ab46c0507acc3a87e5b73babda436b1.tar.bz2
forums-27ba57747ab46c0507acc3a87e5b73babda436b1.tar.xz
forums-27ba57747ab46c0507acc3a87e5b73babda436b1.zip
[feature/oauth] Clean up TODOs
PHPBB3-11673
-rw-r--r--phpBB/includes/ucp/ucp_login_link.php1
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php4
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/bitly.php5
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/facebook.php2
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/google.php6
6 files changed, 8 insertions, 12 deletions
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php
index e8e489fe5f..d782e26c2c 100644
--- a/phpBB/includes/ucp/ucp_login_link.php
+++ b/phpBB/includes/ucp/ucp_login_link.php
@@ -200,7 +200,6 @@ class ucp_login_link
protected function perform_redirect()
{
- // TODO: Make redirect to same page as login would have
redirect('index.php');
}
}
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 0b658f22b6..7d6c7aa1be 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -88,6 +88,8 @@ $lang = array_merge($lang, array(
'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
'AUTHOR' => 'Author',
'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.',
+ 'AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY' => 'Invalid database entry.',
+ 'AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE' => 'Invalid service type provided to OAuth service handler.',
'AUTH_PROVIDER_OAUTH_SERVICE_BITLY' => 'Bitly',
'AUTH_PROVIDER_OAUTH_SERVICE_FACEBOOK' => 'Facebook',
'AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE' => 'Google',
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 6d42b06f6a..e1172f2e70 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -201,8 +201,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
if (!$row)
{
- // TODO: Update exception type and change it to language constant
- throw new Exception('Invalid entry in ' . $this->auth_provider_oauth_token_account_assoc);
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
}
// Update token storage to store the user_id
@@ -216,7 +215,6 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
);
} else {
$url = $service->getAuthorizationUri();
- // TODO: modify $url for the appropriate return points
header('Location: ' . $url);
}
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/bitly.php b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
index 9b8e7ebb03..0918f577ec 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/bitly.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
@@ -67,7 +67,7 @@ class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
{
// TODO: make exception class and use language constant
- throw new Exception('Invalid service provider type');
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
}
// This was a callback request from bitly, get the token
@@ -87,8 +87,7 @@ class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_
{
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
{
- // TODO: make exception class and use language constant
- throw new Exception('Invalid service provider type');
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
}
// Send a request with it
diff --git a/phpBB/phpbb/auth/provider/oauth/service/facebook.php b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
index dc742cca0d..836e4ee052 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/facebook.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
@@ -67,7 +67,7 @@ class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oau
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
{
// TODO: make exception class and use language constant
- throw new Exception('Invalid service provider type');
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
}
// This was a callback request, get the token
diff --git a/phpBB/phpbb/auth/provider/oauth/service/google.php b/phpBB/phpbb/auth/provider/oauth/service/google.php
index e2b0f7d36a..9c782bcaa0 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/google.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/google.php
@@ -77,8 +77,7 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
{
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
{
- // TODO: make exception class and use language constant
- throw new Exception('Invalid service provider type');
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
}
// This was a callback request, get the token
@@ -98,8 +97,7 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
{
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
{
- // TODO: make exception class and use language constant
- throw new Exception('Invalid service provider type');
+ throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
}
// Send a request with it