@@ -359,6 +365,8 @@ else
private string _userinfourl;
private string _clientid;
private string _clientsecret;
+ private string _clientsecrettype = "password";
+ private string _toggleclientsecret = string.Empty;
private string _scopes;
private string _pkce;
private string _redirecturl;
@@ -367,6 +375,8 @@ else
private string _createusers;
private string _secret;
+ private string _secrettype = "password";
+ private string _togglesecret = string.Empty;
private string _issuer;
private string _audience;
private string _lifetime;
@@ -405,6 +415,7 @@ else
_userinfourl = SettingService.GetSetting(settings, "ExternalLogin:UserInfoUrl", "");
_clientid = SettingService.GetSetting(settings, "ExternalLogin:ClientId", "");
_clientsecret = SettingService.GetSetting(settings, "ExternalLogin:ClientSecret", "");
+ _toggleclientsecret = Localizer["Show"];
_scopes = SettingService.GetSetting(settings, "ExternalLogin:Scopes", "");
_pkce = SettingService.GetSetting(settings, "ExternalLogin:PKCE", "false");
_redirecturl = PageState.Uri.Scheme + "://" + PageState.Alias.Name + "/signin-" + _providertype;
@@ -413,6 +424,7 @@ else
_createusers = SettingService.GetSetting(settings, "ExternalLogin:CreateUsers", "true");
_secret = SettingService.GetSetting(settings, "JwtOptions:Secret", "");
+ _togglesecret = Localizer["Show"];
_issuer = SettingService.GetSetting(settings, "JwtOptions:Issuer", PageState.Uri.Scheme + "://" + PageState.Alias.Name);
_audience = SettingService.GetSetting(settings, "JwtOptions:Audience", "");
_lifetime = SettingService.GetSetting(settings, "JwtOptions:Lifetime", "20");
@@ -552,4 +564,32 @@ else
{
_token = await UserService.GetTokenAsync();
}
+
+ private void ToggleClientSecret()
+ {
+ if (_clientsecrettype == "password")
+ {
+ _clientsecrettype = "text";
+ _toggleclientsecret = Localizer["Hide"];
+ }
+ else
+ {
+ _clientsecrettype = "password";
+ _toggleclientsecret = Localizer["Show"];
+ }
+ }
+
+ private void ToggleSecret()
+ {
+ if (_secrettype == "password")
+ {
+ _secrettype = "text";
+ _togglesecret = Localizer["Hide"];
+ }
+ else
+ {
+ _secrettype = "password";
+ _togglesecret = Localizer["Show"];
+ }
+ }
}
diff --git a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx
index 49c4d0e7..c20813b4 100644
--- a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx
+++ b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx
@@ -318,10 +318,16 @@
The default alias for the site. Requests for non-default aliases will be redirected to the default alias.
-
+
Default Alias:
Aliases
+
+ Hide
+
+
+ Show
+
\ No newline at end of file
diff --git a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
index a5c8c285..c26d4611 100644
--- a/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
+++ b/Oqtane.Client/Resources/Modules/Admin/Users/Index.resx
@@ -343,7 +343,7 @@
If you want to want to provide API access, please specify a secret which will be used to encrypt your tokens. The secret should be 16 characters or more to ensure optimal security. Please note that if you change this secret, all existing tokens will become invalid and will need to be regenerated.
- Site Secret:
+ Secret:
Select the Create Token button to generate a long-lived access token (valid for 1 year). Be sure to store this token in a safe location as you will not be able to access it in the future.
@@ -360,4 +360,10 @@
Allow Two Factor?
+
+ Hide
+
+
+ Show
+
\ No newline at end of file