Skip to content

Commit 196656f

Browse files
authored
React to runtime nullability changes (#40268)
* React to runtime nullability changes * Apply suggestions from code review
1 parent aa539f1 commit 196656f

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

src/Identity/Core/src/PublicAPI.Shipped.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
~Microsoft.AspNetCore.Identity.AspNetRoleManager<TRole>
33
~Microsoft.AspNetCore.Identity.AspNetRoleManager<TRole>.AspNetRoleManager(Microsoft.AspNetCore.Identity.IRoleStore<TRole> store, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IRoleValidator<TRole>> roleValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.RoleManager<TRole>> logger, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor) -> void
44
~Microsoft.AspNetCore.Identity.AspNetUserManager<TUser>
5-
~Microsoft.AspNetCore.Identity.AspNetUserManager<TUser>.AspNetUserManager(Microsoft.AspNetCore.Identity.IUserStore<TUser> store, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> optionsAccessor, Microsoft.AspNetCore.Identity.IPasswordHasher<TUser> passwordHasher, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IUserValidator<TUser>> userValidators, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IPasswordValidator<TUser>> passwordValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, System.IServiceProvider services, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.UserManager<TUser>> logger) -> void
5+
Microsoft.AspNetCore.Identity.AspNetUserManager<TUser>.AspNetUserManager(Microsoft.AspNetCore.Identity.IUserStore<TUser!>! store, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions!>! optionsAccessor, Microsoft.AspNetCore.Identity.IPasswordHasher<TUser!>! passwordHasher, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IUserValidator<TUser!>!>! userValidators, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IPasswordValidator<TUser!>!>! passwordValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer! keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber! errors, System.IServiceProvider! services, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.UserManager<TUser!>!>! logger) -> void
66
~Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions.Name.get -> string
77
~Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions.Name.set -> void
88
~Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>
9-
~Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>.DataProtectorTokenProvider(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider dataProtectionProvider, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions> options, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>> logger) -> void
9+
Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>.DataProtectorTokenProvider(Microsoft.AspNetCore.DataProtection.IDataProtectionProvider! dataProtectionProvider, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions!>! options, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser!>!>! logger) -> void
1010
~Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>.Logger.get -> Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>>
1111
~Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>.Name.get -> string
1212
~Microsoft.AspNetCore.Identity.DataProtectorTokenProvider<TUser>.Options.get -> Microsoft.AspNetCore.Identity.DataProtectionTokenProviderOptions
@@ -18,14 +18,14 @@
1818
~Microsoft.AspNetCore.Identity.ExternalLoginInfo.ExternalLoginInfo(System.Security.Claims.ClaimsPrincipal principal, string loginProvider, string providerKey, string displayName) -> void
1919
~Microsoft.AspNetCore.Identity.ExternalLoginInfo.Principal.get -> System.Security.Claims.ClaimsPrincipal
2020
~Microsoft.AspNetCore.Identity.ExternalLoginInfo.Principal.set -> void
21-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ApplicationCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
22-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ApplicationCookie.set -> void
23-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ExternalCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
24-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ExternalCookie.set -> void
25-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorRememberMeCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
26-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorRememberMeCookie.set -> void
27-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorUserIdCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
28-
~Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorUserIdCookie.set -> void
21+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ApplicationCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>?
22+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ApplicationCookie.set -> void
23+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ExternalCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>?
24+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.ExternalCookie.set -> void
25+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorRememberMeCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>?
26+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorRememberMeCookie.set -> void
27+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorUserIdCookie.get -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>?
28+
Microsoft.AspNetCore.Identity.IdentityCookiesBuilder.TwoFactorUserIdCookie.set -> void
2929
~Microsoft.AspNetCore.Identity.ISecurityStampValidator.ValidateAsync(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) -> System.Threading.Tasks.Task
3030
~Microsoft.AspNetCore.Identity.SecurityStampRefreshingPrincipalContext.CurrentPrincipal.get -> System.Security.Claims.ClaimsPrincipal
3131
~Microsoft.AspNetCore.Identity.SecurityStampRefreshingPrincipalContext.CurrentPrincipal.set -> void
@@ -36,7 +36,7 @@
3636
~Microsoft.AspNetCore.Identity.SecurityStampValidator<TUser>.Logger.get -> Microsoft.Extensions.Logging.ILogger
3737
~Microsoft.AspNetCore.Identity.SecurityStampValidator<TUser>.Logger.set -> void
3838
~Microsoft.AspNetCore.Identity.SecurityStampValidator<TUser>.Options.get -> Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions
39-
~Microsoft.AspNetCore.Identity.SecurityStampValidator<TUser>.SecurityStampValidator(Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions> options, Microsoft.AspNetCore.Identity.SignInManager<TUser> signInManager, Microsoft.AspNetCore.Authentication.ISystemClock clock, Microsoft.Extensions.Logging.ILoggerFactory logger) -> void
39+
Microsoft.AspNetCore.Identity.SecurityStampValidator<TUser>.SecurityStampValidator(Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions!>! options, Microsoft.AspNetCore.Identity.SignInManager<TUser!>! signInManager, Microsoft.AspNetCore.Authentication.ISystemClock! clock, Microsoft.Extensions.Logging.ILoggerFactory! logger) -> void
4040
~Microsoft.AspNetCore.Identity.SecurityStampValidator<TUser>.SignInManager.get -> Microsoft.AspNetCore.Identity.SignInManager<TUser>
4141
~Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions.OnRefreshingPrincipal.get -> System.Func<Microsoft.AspNetCore.Identity.SecurityStampRefreshingPrincipalContext, System.Threading.Tasks.Task>
4242
~Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions.OnRefreshingPrincipal.set -> void
@@ -47,22 +47,22 @@
4747
~Microsoft.AspNetCore.Identity.SignInManager<TUser>.Context.set -> void
4848
~Microsoft.AspNetCore.Identity.SignInManager<TUser>.Options.get -> Microsoft.AspNetCore.Identity.IdentityOptions
4949
~Microsoft.AspNetCore.Identity.SignInManager<TUser>.Options.set -> void
50-
~Microsoft.AspNetCore.Identity.SignInManager<TUser>.SignInManager(Microsoft.AspNetCore.Identity.UserManager<TUser> userManager, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor, Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser> claimsFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> optionsAccessor, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<TUser>> logger, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider schemes, Microsoft.AspNetCore.Identity.IUserConfirmation<TUser> confirmation) -> void
50+
Microsoft.AspNetCore.Identity.SignInManager<TUser>.SignInManager(Microsoft.AspNetCore.Identity.UserManager<TUser!>! userManager, Microsoft.AspNetCore.Http.IHttpContextAccessor! contextAccessor, Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser!>! claimsFactory, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions!>! optionsAccessor, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.SignInManager<TUser!>!>! logger, Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider! schemes, Microsoft.AspNetCore.Identity.IUserConfirmation<TUser!>! confirmation) -> void
5151
~Microsoft.AspNetCore.Identity.SignInManager<TUser>.UserManager.get -> Microsoft.AspNetCore.Identity.UserManager<TUser>
5252
~Microsoft.AspNetCore.Identity.SignInManager<TUser>.UserManager.set -> void
5353
~Microsoft.AspNetCore.Identity.TwoFactorSecurityStampValidator<TUser>
54-
~Microsoft.AspNetCore.Identity.TwoFactorSecurityStampValidator<TUser>.TwoFactorSecurityStampValidator(Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions> options, Microsoft.AspNetCore.Identity.SignInManager<TUser> signInManager, Microsoft.AspNetCore.Authentication.ISystemClock clock, Microsoft.Extensions.Logging.ILoggerFactory logger) -> void
54+
Microsoft.AspNetCore.Identity.TwoFactorSecurityStampValidator<TUser>.TwoFactorSecurityStampValidator(Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.SecurityStampValidatorOptions!>! options, Microsoft.AspNetCore.Identity.SignInManager<TUser!>! signInManager, Microsoft.AspNetCore.Authentication.ISystemClock! clock, Microsoft.Extensions.Logging.ILoggerFactory! logger) -> void
5555
~override Microsoft.AspNetCore.Identity.TwoFactorSecurityStampValidator<TUser>.SecurityStampVerified(TUser user, Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) -> System.Threading.Tasks.Task
5656
~override Microsoft.AspNetCore.Identity.TwoFactorSecurityStampValidator<TUser>.VerifySecurityStamp(System.Security.Claims.ClaimsPrincipal principal) -> System.Threading.Tasks.Task<TUser>
5757
~static Microsoft.AspNetCore.Identity.IdentityBuilderExtensions.AddDefaultTokenProviders(this Microsoft.AspNetCore.Identity.IdentityBuilder builder) -> Microsoft.AspNetCore.Identity.IdentityBuilder
5858
~static Microsoft.AspNetCore.Identity.IdentityBuilderExtensions.AddSignInManager(this Microsoft.AspNetCore.Identity.IdentityBuilder builder) -> Microsoft.AspNetCore.Identity.IdentityBuilder
5959
~static Microsoft.AspNetCore.Identity.IdentityBuilderExtensions.AddSignInManager<TSignInManager>(this Microsoft.AspNetCore.Identity.IdentityBuilder builder) -> Microsoft.AspNetCore.Identity.IdentityBuilder
60-
~static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddApplicationCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
61-
~static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddExternalCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
60+
static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddApplicationCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder! builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>!
61+
static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddExternalCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder! builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>!
6262
~static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddIdentityCookies(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) -> Microsoft.AspNetCore.Identity.IdentityCookiesBuilder
6363
~static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddIdentityCookies(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, System.Action<Microsoft.AspNetCore.Identity.IdentityCookiesBuilder> configureCookies) -> Microsoft.AspNetCore.Identity.IdentityCookiesBuilder
64-
~static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddTwoFactorRememberMeCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
65-
~static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddTwoFactorUserIdCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>
64+
static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddTwoFactorRememberMeCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder! builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>!
65+
static Microsoft.AspNetCore.Identity.IdentityCookieAuthenticationBuilderExtensions.AddTwoFactorUserIdCookie(this Microsoft.AspNetCore.Authentication.AuthenticationBuilder! builder) -> Microsoft.Extensions.Options.OptionsBuilder<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions!>!
6666
~static Microsoft.AspNetCore.Identity.SecurityStampValidator.ValidateAsync<TValidator>(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) -> System.Threading.Tasks.Task
6767
~static Microsoft.AspNetCore.Identity.SecurityStampValidator.ValidatePrincipalAsync(Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) -> System.Threading.Tasks.Task
6868
~static Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionExtensions.AddIdentity<TUser, TRole>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) -> Microsoft.AspNetCore.Identity.IdentityBuilder

src/Identity/UI/src/IdentityDefaultUIConfigureOptions.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ public IdentityDefaultUIConfigureOptions(
2424

2525
public IWebHostEnvironment Environment { get; }
2626

27-
public void PostConfigure(string name, RazorPagesOptions options)
27+
public void PostConfigure(string? name, RazorPagesOptions options)
2828
{
29-
name = name ?? throw new ArgumentNullException(nameof(name));
3029
options = options ?? throw new ArgumentNullException(nameof(options));
3130

3231
options.Conventions.AuthorizeAreaFolder(IdentityUIDefaultAreaName, "/Account/Manage");
@@ -47,9 +46,8 @@ public void Configure(CookieAuthenticationOptions options)
4746
// Nothing to do here as Configure(string name, CookieAuthenticationOptions options) is hte one setting things up.
4847
}
4948

50-
public void Configure(string name, CookieAuthenticationOptions options)
49+
public void Configure(string? name, CookieAuthenticationOptions options)
5150
{
52-
name = name ?? throw new ArgumentNullException(nameof(name));
5351
options = options ?? throw new ArgumentNullException(nameof(options));
5452

5553
if (string.Equals(IdentityConstants.ApplicationScheme, name, StringComparison.Ordinal))

0 commit comments

Comments
 (0)