We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 57fddf1 + d227260 commit 7f1abc3Copy full SHA for 7f1abc3
1 file changed
src/FlowCtl.Infrastructure/Services/Authentication/AuthenticationManager.cs
@@ -60,10 +60,11 @@ public AuthenticationData LoginBearer(string token)
60
if (data.Username != null)
61
data.Username = _protector.Unprotect(data.Username);
62
63
- if (data?.Type == AuthenticationType.Basic && data.Password != null)
+ // data is guaranteed non-null within this scope, so we can evaluate authentication type directly.
64
+ if (data.Type == AuthenticationType.Basic && data.Password != null)
65
data.Password = _protector.Unprotect(data.Password);
-
66
- if (data?.Type == AuthenticationType.Bearer && data.AccessToken != null)
+
67
+ if (data.Type == AuthenticationType.Bearer && data.AccessToken != null)
68
data.AccessToken = _protector.Unprotect(data.AccessToken);
69
}
70
0 commit comments