mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 03:48:53 +00:00
[feature/oauth] Clean up TODOs
PHPBB3-11673
This commit is contained in:
parent
de17d5bdcc
commit
27ba57747a
6 changed files with 8 additions and 12 deletions
|
@ -200,7 +200,6 @@ class ucp_login_link
|
||||||
|
|
||||||
protected function perform_redirect()
|
protected function perform_redirect()
|
||||||
{
|
{
|
||||||
// TODO: Make redirect to same page as login would have
|
|
||||||
redirect('index.php');
|
redirect('index.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,6 +88,8 @@ $lang = array_merge($lang, array(
|
||||||
'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
|
'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.',
|
||||||
'AUTHOR' => 'Author',
|
'AUTHOR' => 'Author',
|
||||||
'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.',
|
'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_BITLY' => 'Bitly',
|
||||||
'AUTH_PROVIDER_OAUTH_SERVICE_FACEBOOK' => 'Facebook',
|
'AUTH_PROVIDER_OAUTH_SERVICE_FACEBOOK' => 'Facebook',
|
||||||
'AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE' => 'Google',
|
'AUTH_PROVIDER_OAUTH_SERVICE_GOOGLE' => 'Google',
|
||||||
|
|
|
@ -201,8 +201,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
|
|
||||||
if (!$row)
|
if (!$row)
|
||||||
{
|
{
|
||||||
// TODO: Update exception type and change it to language constant
|
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
|
||||||
throw new Exception('Invalid entry in ' . $this->auth_provider_oauth_token_account_assoc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update token storage to store the user_id
|
// Update token storage to store the user_id
|
||||||
|
@ -216,7 +215,6 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$url = $service->getAuthorizationUri();
|
$url = $service->getAuthorizationUri();
|
||||||
// TODO: modify $url for the appropriate return points
|
|
||||||
header('Location: ' . $url);
|
header('Location: ' . $url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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))
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
|
||||||
{
|
{
|
||||||
// TODO: make exception class and use language constant
|
// 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
|
// 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))
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Bitly))
|
||||||
{
|
{
|
||||||
// TODO: make exception class and use language constant
|
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
throw new Exception('Invalid service provider type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send a request with it
|
// Send a request with it
|
||||||
|
|
|
@ -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))
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Facebook))
|
||||||
{
|
{
|
||||||
// TODO: make exception class and use language constant
|
// 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
|
// This was a callback request, get the token
|
||||||
|
|
|
@ -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))
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
|
||||||
{
|
{
|
||||||
// TODO: make exception class and use language constant
|
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
throw new Exception('Invalid service provider type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This was a callback request, get the token
|
// 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))
|
if (!($this->service_provider instanceof \OAuth\OAuth2\Service\Google))
|
||||||
{
|
{
|
||||||
// TODO: make exception class and use language constant
|
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_SERVICE_TYPE');
|
||||||
throw new Exception('Invalid service provider type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send a request with it
|
// Send a request with it
|
||||||
|
|
Loading…
Add table
Reference in a new issue