Disable password auth setting
This commit is contained in:
parent
1180d518a2
commit
188020597c
20 changed files with 164 additions and 75 deletions
|
|
@ -366,8 +366,10 @@ public class SettingsService : ISettingsService
|
|||
var url = authority + "/.well-known/openid-configuration";
|
||||
try
|
||||
{
|
||||
await url.GetJsonAsync<OpenIdConnectConfiguration>();
|
||||
return true;
|
||||
//await url.GetJsonAsync<OpenIdConnectConfiguration>();
|
||||
//return true;
|
||||
var res = await url.GetAsync();
|
||||
return res.StatusCode == 200;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
@ -455,6 +457,13 @@ public class SettingsService : ISettingsService
|
|||
_unitOfWork.SettingsRepository.Update(setting);
|
||||
}
|
||||
|
||||
if (setting.Key == ServerSettingKey.DisablePasswordAuthentication &&
|
||||
updateSettingsDto.OidcConfig.DisablePasswordAuthentication + string.Empty != setting.Value)
|
||||
{
|
||||
setting.Value = updateSettingsDto.OidcConfig.DisablePasswordAuthentication + string.Empty;
|
||||
_unitOfWork.SettingsRepository.Update(setting);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void UpdateEmailSettings(ServerSetting setting, ServerSettingDto updateSettingsDto)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue