1 write to Parameters
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationProperties.cs (1)
45
Parameters
= parameters ?? new Dictionary<string, object?>(StringComparer.Ordinal);
60 references to Parameters
Microsoft.AspNetCore.Authentication.Abstractions (5)
AuthenticationProperties.cs (5)
55
new Dictionary<string, object?>(
Parameters
, StringComparer.Ordinal));
147
/// Get a parameter from the <see cref="
Parameters
"/> collection.
153
=>
Parameters
.TryGetValue(key, out var obj) && obj is T value ? value : default;
156
/// Set a parameter value in the <see cref="
Parameters
"/> collection.
162
=>
Parameters
[key] = value;
Microsoft.AspNetCore.Authentication.Core.Test (39)
AuthenticationPropertiesTests.cs (31)
25
Assert.Same(parameters, props.
Parameters
);
28
Assert.NotSame(props.
Parameters
, copy.
Parameters
);
31
Assert.Equal(props.
Parameters
, copy.
Parameters
);
33
props.
Parameters
["something"] = "bad";
35
Assert.NotEqual(props.
Parameters
, copy.
Parameters
);
43
Assert.Empty(props.
Parameters
);
55
Assert.Empty(props.
Parameters
);
72
Assert.Same(parameters, props.
Parameters
);
115
Assert.Empty(props.
Parameters
);
119
Assert.Equal("foo bar", props.
Parameters
["foo"]);
120
Assert.Single(props.
Parameters
);
124
Assert.Null(props.
Parameters
["foo"]);
125
Assert.Single(props.
Parameters
);
133
Assert.Empty(props.
Parameters
);
137
Assert.Equal(123, props.
Parameters
["foo"]);
138
Assert.Single(props.
Parameters
);
142
Assert.Null(props.
Parameters
["foo"]);
143
Assert.Single(props.
Parameters
);
151
Assert.Empty(props.
Parameters
);
156
Assert.Same(list, props.
Parameters
["foo"]);
157
Assert.Single(props.
Parameters
);
161
Assert.Null(props.
Parameters
["foo"]);
162
Assert.Single(props.
Parameters
);
319
props.
Parameters
.Add("baz", "quux");
343
Assert.NotNull(deserialized.
Parameters
);
344
Assert.Empty(deserialized.
Parameters
);
357
Assert.NotNull(deserialized!.
Parameters
);
358
Assert.Empty(deserialized.
Parameters
);
AuthenticationTicketTests.cs (8)
28
Assert.Same(parameters, ticket.Properties.
Parameters
);
32
Assert.NotSame(ticket.Properties.
Parameters
, copy.Properties.
Parameters
);
35
Assert.Equal(ticket.Properties.
Parameters
, copy.Properties.
Parameters
);
37
props.
Parameters
["something"] = "bad";
39
Assert.NotEqual(ticket.Properties.
Parameters
, copy.Properties.
Parameters
);
Microsoft.AspNetCore.Authentication.Test (16)
OAuthChallengePropertiesTest.cs (16)
20
Assert.Equal(new string[] { "foo", "bar" }, properties.
Parameters
["scope"]);
27
properties.
Parameters
["scope"] = new string[] { "foo", "bar" };
40
Assert.Equal(new string[] { "foo", "bar" }, properties.
Parameters
["scope"]);
57
properties.
Parameters
["max_age"] = TimeSpan.FromSeconds(500);
72
Assert.Equal("login", properties.
Parameters
["prompt"]);
79
properties.
Parameters
["prompt"] = "consent";
97
Assert.Equal("offline", properties.
Parameters
["access_type"]);
99
Assert.Equal("force", properties.
Parameters
["approval_prompt"]);
101
Assert.Equal("test@example.com", properties.
Parameters
["login_hint"]);
103
Assert.Equal("login", properties.
Parameters
["prompt"]);
110
properties.
Parameters
["access_type"] = "offline";
111
properties.
Parameters
["approval_prompt"] = "force";
112
properties.
Parameters
["login_hint"] = "test@example.com";
113
properties.
Parameters
["prompt"] = "login";
140
Assert.Equal(true, properties.
Parameters
["include_granted_scopes"]);
144
Assert.Equal(false, properties.
Parameters
["include_granted_scopes"]);