Skip to content

Commit 8518e82

Browse files
committed
Abbreviation cb for CREDENTIALS-BEARER.DAT
1 parent 5c5fcee commit 8518e82

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

src/AasxServerBlazor/Shared/MainLayout.razor

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
@{
133133
if (_edit)
134134
{
135-
<span style="color:red;">edit</span>
135+
<span style="color:red;">edit</span>
136136
}
137137

138138
async Task update()
@@ -154,39 +154,43 @@
154154
Program.submodelAPIcount = 0;
155155
break;
156156
default:
157-
{
158-
if (CurrentValue.Contains("FORCE-POLICY"))
159157
{
160-
Program.withPolicy = CurrentValue.Contains("ON");
161-
}
162-
else
163-
{
164-
if (CurrentValue.Contains("get="))
158+
if (CurrentValue.Contains("FORCE-POLICY"))
165159
{
166-
CurrentValue = CurrentValue.Replace("get=", "");
167-
Program.getUrl = CurrentValue;
168-
Program.signalNewData(2);
169-
}
170-
else if (CurrentValue.Contains("secret="))
171-
{
172-
CurrentValue = CurrentValue.Replace("secret=", "");
173-
Program.getUrl = CurrentValue;
174-
Program.signalNewData(2);
160+
Program.withPolicy = CurrentValue.Contains("ON");
175161
}
176162
else
177163
{
178-
if (string.IsNullOrEmpty(_role))
179-
_role = roleList[ 0 ];
180-
if (CurrentValue.Contains("Email=") || CurrentValue.Contains("@"))
164+
if (CurrentValue.Contains("get="))
181165
{
182-
CurrentValue = CurrentValue.Replace("Email=", "");
183-
AasxCredentials.initByEmail(cs.credentials, CurrentValue);
184-
_input = CurrentValue;
185-
_role = string.Empty;
166+
CurrentValue = CurrentValue.Replace("get=", "");
167+
Program.getUrl = CurrentValue;
168+
Program.signalNewData(2);
169+
}
170+
else if (CurrentValue.Contains("secret="))
171+
{
172+
CurrentValue = CurrentValue.Replace("secret=", "");
173+
Program.getUrl = CurrentValue;
174+
Program.signalNewData(2);
186175
}
187-
else if (CurrentValue.Contains("CREDENTIALS-") && CurrentValue.Contains(".DAT"))
176+
else
188177
{
189-
AasxCredentials.initByFile(cs.credentials, CurrentValue);
178+
if (string.IsNullOrEmpty(_role))
179+
_role = roleList[ 0 ];
180+
if (CurrentValue.Contains("Email=") || CurrentValue.Contains("@"))
181+
{
182+
CurrentValue = CurrentValue.Replace("Email=", "");
183+
AasxCredentials.initByEmail(cs.credentials, CurrentValue);
184+
_input = CurrentValue;
185+
_role = string.Empty;
186+
}
187+
else if (CurrentValue == "cb" || (CurrentValue.Contains("CREDENTIALS-") && CurrentValue.Contains(".DAT")))
188+
{
189+
if (CurrentValue == "cb")
190+
{
191+
CurrentValue = "CREDENTIALS-BEARER.DAT";
192+
}
193+
AasxCredentials.initByFile(cs.credentials, CurrentValue);
190194
_input = CurrentValue;
191195
_role = string.Empty;
192196
}

0 commit comments

Comments
 (0)