mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/oauth] Finish the template so it "works"
PHPBB3-11673
This commit is contained in:
parent
93cbdc37b5
commit
32678f63ed
2 changed files with 8 additions and 5 deletions
|
@ -5,11 +5,11 @@
|
||||||
<legend>{oauth_services.ACTUAL_NAME}</legend>
|
<legend>{oauth_services.ACTUAL_NAME}</legend>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="oauth_service_{oauth_services.NAME}_key">{L_AUTH_PROVIDER_OAUTH_KEY}{L_COLON}</label><br /><span>{L_AUTH_PROVIDER_OAUTH_KEY_EXPLAIN}</span></dt>
|
<dt><label for="oauth_service_{oauth_services.NAME}_key">{L_AUTH_PROVIDER_OAUTH_KEY}{L_COLON}</label><br /><span>{L_AUTH_PROVIDER_OAUTH_KEY_EXPLAIN}</span></dt>
|
||||||
<dd><input type="text" id="oauth_service_{oauth_services.NAME}_key" size="40" name="config[auth_oauth_{oauth_services.NAME}_key]" value="{AUTH_LDAP_SERVER}" /></dd>
|
<dd><input type="text" id="oauth_service_{oauth_services.NAME}_key" size="40" name="config[auth_oauth_{oauth_services.NAME}_key]" value="{oauth_services.KEY}" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="oauth_service_{oauth_services.NAME}_secret">{L_AUTH_PROVIDER_OAUTH_SECRET}{L_COLON}</label><br /><span>{L_AUTH_PROVIDER_OAUTH_SECRET_EXPLAIN}</span></dt>
|
<dt><label for="oauth_service_{oauth_services.NAME}_secret">{L_AUTH_PROVIDER_OAUTH_SECRET}{L_COLON}</label><br /><span>{L_AUTH_PROVIDER_OAUTH_SECRET_EXPLAIN}</span></dt>
|
||||||
<dd><input type="text" id="oauth_service_{oauth_services.NAME}_secret" size="40" name="config[auth_oauth_{oauth_services.NAME}_secret]" value="{AUTH_LDAP_SERVER}" /></dd>
|
<dd><input type="text" id="oauth_service_{oauth_services.NAME}_secret" size="40" name="config[auth_oauth_{oauth_services.NAME}_secret]" value="{oauth_services.SECRET}" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<!-- END oauth_services -->
|
<!-- END oauth_services -->
|
||||||
|
|
|
@ -271,9 +271,12 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
foreach ($this->service_providers as $service_name => $service_provider)
|
foreach ($this->service_providers as $service_name => $service_provider)
|
||||||
{
|
{
|
||||||
$actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
|
$actual_name = str_replace('auth.provider.oauth.service.', '', $service_name);
|
||||||
$ret['TEMPLATE_VARS'][$actual_name] = array();
|
$ret['TEMPLATE_VARS'][$actual_name] = array(
|
||||||
$ret['TEMPLATE_VARS'][$actual_name]['NAME'] = $actual_name;
|
'ACTUAL_NAME' => 'L_AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name),
|
||||||
$ret['TEMPLATE_VARS'][$actual_name]['ACTUAL_NAME'] = 'L_AUTH_PROVIDER_OAUTH_SERVICE_' . strtoupper($actual_name);
|
'KEY' => $new_config['auth_oauth_' . $actual_name . '_key'],
|
||||||
|
'NAME' => $actual_name,
|
||||||
|
'SECRET' => $new_config['auth_oauth_' . $actual_name . '_secret'],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue