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