Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Apr 7, 2024
1 parent 8fa9d0a commit 1b43261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 1 addition & 9 deletions src/Alba/Internal/LightweightCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,7 @@ public void Fill(TKey key, TValue value)

public bool TryRetrieve(TKey key, [MaybeNullWhen(false)] out TValue value)
{
value = default;

if (_values.ContainsKey(key))
{
value = _values[key];
return true;
}

return false;
return _values.TryGetValue(key, out value);
}

public void Each(Action<TValue> action)
Expand Down
3 changes: 1 addition & 2 deletions src/IdentityServer.New/Pages/Diagnostics/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ public ViewModel(AuthenticateResult result)
{
AuthenticateResult = result;

if (result.Properties.Items.ContainsKey("client_list"))
if (result.Properties.Items.TryGetValue("client_list", out var encoded))
{
var encoded = result.Properties.Items["client_list"];
var bytes = Base64Url.Decode(encoded);
var value = Encoding.UTF8.GetString(bytes);

Expand Down

0 comments on commit 1b43261

Please sign in to comment.