oauth
class oauth extends base
OAuth authentication provider for phpBB3
Properties
protected config | $config | ||
protected driver_interface | $db | ||
protected db | $db_auth | ||
protected dispatcher | $dispatcher | ||
protected language | $language | ||
protected request_interface | $request | ||
protected service_collection | $service_providers | ||
protected user | $user | ||
protected string | $oauth_token_table | ||
protected string | $oauth_state_table | ||
protected string | $oauth_account_table | ||
protected string | $users_table | ||
protected string | $root_path | ||
protected string | $php_ext |
Methods
Checks whether the user is currently identified to the authentication provider.
This function is used to output any required fields in the authentication admin panel. It also defines any required configuration table fields.
This function updates the template with variables related to the acp options with whatever configuration values are passed to it as an array.
Returns an array of data necessary to build custom elements on the login form.
Returns an array of data necessary to build the ucp_auth_link page
Performs additional actions during logout.
The session validation function checks whether the user is still logged into phpBB.
Checks to see if $login_link_data contains all information except for the user_id of an account needed to successfully link an external account to a forum account.
Links an external account to a phpBB account.
Unlinks an external account from a phpBB account.
Constructor.
Performs login.
Performs the account linking for login_link.
Performs the account linking for auth_link.
Performs the query that inserts an account link
Returns the service name for an OAuth provider name.
Returns the OAuth provider name from a service name.
Returns the localized title for the OAuth provider.
Returns whether or not the authorization code is set.
Sets a redirect to the authorization uri.
Details
at line 135
bool|string
init()
Checks whether the user is currently identified to the authentication provider.
Called in acp_board while setting authentication plugins. Changing to an authentication provider will not be permitted in acp_board if there is an error.
in
base at line 32
array|null
autologin()
Autologin function
at line 367
array|null
acp()
This function is used to output any required fields in the authentication admin panel. It also defines any required configuration table fields.
at line 387
array|null
get_acp_template(config $new_config)
This function updates the template with variables related to the acp options with whatever configuration values are passed to it as an array.
It then returns the name of the acp file related to this authentication provider.
at line 336
array|null
get_login_data()
Returns an array of data necessary to build custom elements on the login form.
at line 486
array|null
get_auth_link_data(int $user_id = 0)
Returns an array of data necessary to build the ucp_auth_link page
at line 474
logout(array $data, bool $new_session)
Performs additional actions during logout.
in
base at line 80
bool
validate_session(array $user)
The session validation function checks whether the user is still logged into phpBB.
at line 414
string|null
login_link_has_necessary_data(array $login_link_data)
Checks to see if $login_link_data contains all information except for the user_id of an account needed to successfully link an external account to a forum account.
at line 433
link_account(array $link_data)
Links an external account to a phpBB account.
at line 532
unlink_account(array $link_data)
Unlinks an external account from a phpBB account.
at line 98
__construct(config $config, driver_interface $db, db $db_auth, dispatcher $dispatcher, language $language, request_interface $request, service_collection $service_providers, user $user, string $oauth_token_table, string $oauth_state_table, string $oauth_account_table, string $users_table, string $root_path, string $php_ext)
Constructor.
at line 154
array
login(string $username, string $password)
Performs login.
at line 566
protected string|false
link_account_login_link(array $link_data, string $service_name)
Performs the account linking for login_link.
at line 624
protected string|false
link_account_auth_link(array $link_data, string $service_name)
Performs the account linking for auth_link.
at line 674
protected
link_account_perform_link(array $data)
Performs the query that inserts an account link
at line 716
protected ServiceInterface
get_service(string $provider, token_storage $storage, string $query)
Returns a new service object.
at line 773
protected string
get_service_name(string $provider)
Returns the service name for an OAuth provider name.
at line 789
protected string
get_provider(string $service_name)
Returns the OAuth provider name from a service name.
at line 800
protected string
get_provider_title(string $provider)
Returns the localized title for the OAuth provider.
at line 812
protected bool
is_set_code(AbstractService|AbstractService $service)
Returns whether or not the authorization code is set.
at line 834
protected array|false
set_redirect(AbstractService|AbstractService $service)
Sets a redirect to the authorization uri.