Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API diff between .NET 7 and .NET 8 #8921

Merged
merged 4 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions release-notes/8.0/8.0.0/api-diff/Microsoft.AspNetCore.App/8.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# API Difference 7.0.0 vs 8.0.0

API listing follows standard diff formatting.
Lines preceded by a '+' are additions and a '-' indicates removal.

* [Microsoft.AspNetCore](8.0.0_Microsoft.AspNetCore.md)
* [Microsoft.AspNetCore.Antiforgery](8.0.0_Microsoft.AspNetCore.Antiforgery.md)
* [Microsoft.AspNetCore.Authentication](8.0.0_Microsoft.AspNetCore.Authentication.md)
* [Microsoft.AspNetCore.Authentication.BearerToken](8.0.0_Microsoft.AspNetCore.Authentication.BearerToken.md)
* [Microsoft.AspNetCore.Authentication.Cookies](8.0.0_Microsoft.AspNetCore.Authentication.Cookies.md)
* [Microsoft.AspNetCore.Authentication.OAuth](8.0.0_Microsoft.AspNetCore.Authentication.OAuth.md)
* [Microsoft.AspNetCore.Authorization](8.0.0_Microsoft.AspNetCore.Authorization.md)
* [Microsoft.AspNetCore.Builder](8.0.0_Microsoft.AspNetCore.Builder.md)
* [Microsoft.AspNetCore.Components](8.0.0_Microsoft.AspNetCore.Components.md)
* [Microsoft.AspNetCore.Components.Endpoints](8.0.0_Microsoft.AspNetCore.Components.Endpoints.md)
* [Microsoft.AspNetCore.Components.Endpoints.Infrastructure](8.0.0_Microsoft.AspNetCore.Components.Endpoints.Infrastructure.md)
* [Microsoft.AspNetCore.Components.Forms](8.0.0_Microsoft.AspNetCore.Components.Forms.md)
* [Microsoft.AspNetCore.Components.Forms.Mapping](8.0.0_Microsoft.AspNetCore.Components.Forms.Mapping.md)
* [Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure](8.0.0_Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.md)
* [Microsoft.AspNetCore.Components.Rendering](8.0.0_Microsoft.AspNetCore.Components.Rendering.md)
* [Microsoft.AspNetCore.Components.RenderTree](8.0.0_Microsoft.AspNetCore.Components.RenderTree.md)
* [Microsoft.AspNetCore.Components.Routing](8.0.0_Microsoft.AspNetCore.Components.Routing.md)
* [Microsoft.AspNetCore.Components.Sections](8.0.0_Microsoft.AspNetCore.Components.Sections.md)
* [Microsoft.AspNetCore.Components.Server.Circuits](8.0.0_Microsoft.AspNetCore.Components.Server.Circuits.md)
* [Microsoft.AspNetCore.Components.Web](8.0.0_Microsoft.AspNetCore.Components.Web.md)
* [Microsoft.AspNetCore.Components.Web.HtmlRendering](8.0.0_Microsoft.AspNetCore.Components.Web.HtmlRendering.md)
* [Microsoft.AspNetCore.Components.Web.Virtualization](8.0.0_Microsoft.AspNetCore.Components.Web.Virtualization.md)
* [Microsoft.AspNetCore.Connections](8.0.0_Microsoft.AspNetCore.Connections.md)
* [Microsoft.AspNetCore.Connections.Abstractions](8.0.0_Microsoft.AspNetCore.Connections.Abstractions.md)
* [Microsoft.AspNetCore.Connections.Features](8.0.0_Microsoft.AspNetCore.Connections.Features.md)
* [Microsoft.AspNetCore.Cors](8.0.0_Microsoft.AspNetCore.Cors.md)
* [Microsoft.AspNetCore.DataProtection.XmlEncryption](8.0.0_Microsoft.AspNetCore.DataProtection.XmlEncryption.md)
* [Microsoft.AspNetCore.Diagnostics](8.0.0_Microsoft.AspNetCore.Diagnostics.md)
* [Microsoft.AspNetCore.Hosting](8.0.0_Microsoft.AspNetCore.Hosting.md)
* [Microsoft.AspNetCore.Html](8.0.0_Microsoft.AspNetCore.Html.md)
* [Microsoft.AspNetCore.Http](8.0.0_Microsoft.AspNetCore.Http.md)
* [Microsoft.AspNetCore.Http.Connections](8.0.0_Microsoft.AspNetCore.Http.Connections.md)
* [Microsoft.AspNetCore.Http.Extensions](8.0.0_Microsoft.AspNetCore.Http.Extensions.md)
* [Microsoft.AspNetCore.Http.Features](8.0.0_Microsoft.AspNetCore.Http.Features.md)
* [Microsoft.AspNetCore.Http.HttpResults](8.0.0_Microsoft.AspNetCore.Http.HttpResults.md)
* [Microsoft.AspNetCore.Http.Metadata](8.0.0_Microsoft.AspNetCore.Http.Metadata.md)
* [Microsoft.AspNetCore.Http.Timeouts](8.0.0_Microsoft.AspNetCore.Http.Timeouts.md)
* [Microsoft.AspNetCore.HttpLogging](8.0.0_Microsoft.AspNetCore.HttpLogging.md)
* [Microsoft.AspNetCore.HttpOverrides](8.0.0_Microsoft.AspNetCore.HttpOverrides.md)
* [Microsoft.AspNetCore.Identity](8.0.0_Microsoft.AspNetCore.Identity.md)
* [Microsoft.AspNetCore.Identity.Data](8.0.0_Microsoft.AspNetCore.Identity.Data.md)
* [Microsoft.AspNetCore.Identity.UI.Services](8.0.0_Microsoft.AspNetCore.Identity.UI.Services.md)
* [Microsoft.AspNetCore.Mvc](8.0.0_Microsoft.AspNetCore.Mvc.md)
* [Microsoft.AspNetCore.Mvc.ApplicationModels](8.0.0_Microsoft.AspNetCore.Mvc.ApplicationModels.md)
* [Microsoft.AspNetCore.Mvc.Controllers](8.0.0_Microsoft.AspNetCore.Mvc.Controllers.md)
* [Microsoft.AspNetCore.Mvc.Filters](8.0.0_Microsoft.AspNetCore.Mvc.Filters.md)
* [Microsoft.AspNetCore.Mvc.Infrastructure](8.0.0_Microsoft.AspNetCore.Mvc.Infrastructure.md)
* [Microsoft.AspNetCore.Mvc.ModelBinding](8.0.0_Microsoft.AspNetCore.Mvc.ModelBinding.md)
* [Microsoft.AspNetCore.Mvc.Razor](8.0.0_Microsoft.AspNetCore.Mvc.Razor.md)
* [Microsoft.AspNetCore.Mvc.Razor.Internal](8.0.0_Microsoft.AspNetCore.Mvc.Razor.Internal.md)
* [Microsoft.AspNetCore.Mvc.Razor.TagHelpers](8.0.0_Microsoft.AspNetCore.Mvc.Razor.TagHelpers.md)
* [Microsoft.AspNetCore.Mvc.RazorPages](8.0.0_Microsoft.AspNetCore.Mvc.RazorPages.md)
* [Microsoft.AspNetCore.Mvc.Rendering](8.0.0_Microsoft.AspNetCore.Mvc.Rendering.md)
* [Microsoft.AspNetCore.Mvc.Routing](8.0.0_Microsoft.AspNetCore.Mvc.Routing.md)
* [Microsoft.AspNetCore.Mvc.TagHelpers](8.0.0_Microsoft.AspNetCore.Mvc.TagHelpers.md)
* [Microsoft.AspNetCore.Mvc.ViewFeatures](8.0.0_Microsoft.AspNetCore.Mvc.ViewFeatures.md)
* [Microsoft.AspNetCore.OutputCaching](8.0.0_Microsoft.AspNetCore.OutputCaching.md)
* [Microsoft.AspNetCore.Razor.TagHelpers](8.0.0_Microsoft.AspNetCore.Razor.TagHelpers.md)
* [Microsoft.AspNetCore.Rewrite](8.0.0_Microsoft.AspNetCore.Rewrite.md)
* [Microsoft.AspNetCore.Routing](8.0.0_Microsoft.AspNetCore.Routing.md)
* [Microsoft.AspNetCore.Routing.Constraints](8.0.0_Microsoft.AspNetCore.Routing.Constraints.md)
* [Microsoft.AspNetCore.Routing.Patterns](8.0.0_Microsoft.AspNetCore.Routing.Patterns.md)
* [Microsoft.AspNetCore.Routing.Template](8.0.0_Microsoft.AspNetCore.Routing.Template.md)
* [Microsoft.AspNetCore.Server.HttpSys](8.0.0_Microsoft.AspNetCore.Server.HttpSys.md)
* [Microsoft.AspNetCore.Server.IIS](8.0.0_Microsoft.AspNetCore.Server.IIS.md)
* [Microsoft.AspNetCore.Server.IIS.Core](8.0.0_Microsoft.AspNetCore.Server.IIS.Core.md)
* [Microsoft.AspNetCore.Server.Kestrel.Core](8.0.0_Microsoft.AspNetCore.Server.Kestrel.Core.md)
* [Microsoft.AspNetCore.Server.Kestrel.Core.Features](8.0.0_Microsoft.AspNetCore.Server.Kestrel.Core.Features.md)
* [Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes](8.0.0_Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes.md)
* [Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets](8.0.0_Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.md)
* [Microsoft.AspNetCore.Session](8.0.0_Microsoft.AspNetCore.Session.md)
* [Microsoft.AspNetCore.SignalR](8.0.0_Microsoft.AspNetCore.SignalR.md)
* [Microsoft.AspNetCore.SignalR.Protocol](8.0.0_Microsoft.AspNetCore.SignalR.Protocol.md)
* [Microsoft.Extensions.Caching.Memory](8.0.0_Microsoft.Extensions.Caching.Memory.md)
* [Microsoft.Extensions.Configuration](8.0.0_Microsoft.Extensions.Configuration.md)
* [Microsoft.Extensions.Configuration.Xml](8.0.0_Microsoft.Extensions.Configuration.Xml.md)
* [Microsoft.Extensions.DependencyInjection](8.0.0_Microsoft.Extensions.DependencyInjection.md)
* [Microsoft.Extensions.DependencyInjection.Extensions](8.0.0_Microsoft.Extensions.DependencyInjection.Extensions.md)
* [Microsoft.Extensions.Diagnostics.HealthChecks](8.0.0_Microsoft.Extensions.Diagnostics.HealthChecks.md)
* [Microsoft.Extensions.Diagnostics.Metrics](8.0.0_Microsoft.Extensions.Diagnostics.Metrics.md)
* [Microsoft.Extensions.Diagnostics.Metrics.Configuration](8.0.0_Microsoft.Extensions.Diagnostics.Metrics.Configuration.md)
* [Microsoft.Extensions.FileProviders](8.0.0_Microsoft.Extensions.FileProviders.md)
* [Microsoft.Extensions.Hosting](8.0.0_Microsoft.Extensions.Hosting.md)
* [Microsoft.Extensions.Http.Logging](8.0.0_Microsoft.Extensions.Http.Logging.md)
* [Microsoft.Extensions.Logging](8.0.0_Microsoft.Extensions.Logging.md)
* [Microsoft.Extensions.Logging.Console](8.0.0_Microsoft.Extensions.Logging.Console.md)
* [Microsoft.Extensions.ObjectPool](8.0.0_Microsoft.Extensions.ObjectPool.md)
* [Microsoft.Extensions.Options](8.0.0_Microsoft.Extensions.Options.md)
* [Microsoft.Extensions.Primitives](8.0.0_Microsoft.Extensions.Primitives.md)
* [Microsoft.JSInterop](8.0.0_Microsoft.JSInterop.md)
* [Microsoft.JSInterop.Infrastructure](8.0.0_Microsoft.JSInterop.Infrastructure.md)
* [Microsoft.Net.Http.Headers](8.0.0_Microsoft.Net.Http.Headers.md)
* [System.Diagnostics.Eventing.Reader](8.0.0_System.Diagnostics.Eventing.Reader.md)
* [System.Security.Cryptography.Xml](8.0.0_System.Security.Cryptography.Xml.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Microsoft.AspNetCore.Antiforgery

``` diff
namespace Microsoft.AspNetCore.Antiforgery {
+ public interface IAntiforgeryMetadata {
+ bool RequiresValidation { get; }
+ }
+ public interface IAntiforgeryValidationFeature {
+ Exception Error { get; }
+ bool IsValid { get; }
+ }
+ [AttributeUsageAttribute(68)]
+ public class RequireAntiforgeryTokenAttribute : Attribute, IAntiforgeryMetadata {
+ public RequireAntiforgeryTokenAttribute(bool required = true);
+ public bool RequiresValidation { get; }
+ }
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Microsoft.AspNetCore.Authentication.BearerToken

``` diff
+namespace Microsoft.AspNetCore.Authentication.BearerToken {
+ public sealed class AccessTokenResponse {
+ public AccessTokenResponse();
+ public required string AccessToken { get; set; }
+ public required long ExpiresIn { get; set; }
+ public required string RefreshToken { get; set; }
+ public string TokenType { get; }
+ }
+ public static class BearerTokenDefaults {
+ public const string AuthenticationScheme = "BearerToken";
+ }
+ public class BearerTokenEvents {
+ public BearerTokenEvents();
+ public Func<MessageReceivedContext, Task> OnMessageReceived { get; set; }
+ public virtual Task MessageReceivedAsync(MessageReceivedContext context);
+ }
+ public sealed class BearerTokenOptions : AuthenticationSchemeOptions {
+ public BearerTokenOptions();
+ public TimeSpan BearerTokenExpiration { get; set; }
+ public ISecureDataFormat<AuthenticationTicket> BearerTokenProtector { get; set; }
+ public new BearerTokenEvents Events { get; set; }
+ public TimeSpan RefreshTokenExpiration { get; set; }
+ public ISecureDataFormat<AuthenticationTicket> RefreshTokenProtector { get; set; }
+ }
+ public class MessageReceivedContext : ResultContext<BearerTokenOptions> {
+ public MessageReceivedContext(HttpContext context, AuthenticationScheme scheme, BearerTokenOptions options);
+ public string Token { get; set; }
+ }
+}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Microsoft.AspNetCore.Authentication.Cookies

``` diff
namespace Microsoft.AspNetCore.Authentication.Cookies {
public class CookieAuthenticationHandler : SignInAuthenticationHandler<CookieAuthenticationOptions> {
+ public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder);
- public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider on AuthenticationSchemeOptions instead.")]
+ public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Microsoft.AspNetCore.Authentication.OAuth

``` diff
namespace Microsoft.AspNetCore.Authentication.OAuth {
public class OAuthHandler<TOptions> : RemoteAuthenticationHandler<TOptions> where TOptions : OAuthOptions, new() {
+ public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder);
- public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider on AuthenticationSchemeOptions instead.")]
+ public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Microsoft.AspNetCore.Authentication

``` diff
namespace Microsoft.AspNetCore.Authentication {
+ public class AuthenticationFailureException : Exception {
+ public AuthenticationFailureException(string message);
+ public AuthenticationFailureException(string message, Exception innerException);
+ }
public abstract class AuthenticationHandler<TOptions> : IAuthenticationHandler where TOptions : AuthenticationSchemeOptions, new() {
+ protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder);
- protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider on AuthenticationSchemeOptions instead.")]
+ protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
- protected ISystemClock Clock { get; }
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider instead.")]
+ protected ISystemClock Clock { get; }
+ protected TimeProvider TimeProvider { get; }
}
public class AuthenticationSchemeOptions {
+ public TimeProvider TimeProvider { get; set; }
}
- public interface ISystemClock
+ [ObsoleteAttribute("Use TimeProvider instead.")]
+ public interface ISystemClock
public class PolicySchemeHandler : SignInAuthenticationHandler<PolicySchemeOptions> {
+ public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder);
- public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider on AuthenticationSchemeOptions instead.")]
+ public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
}
public abstract class RemoteAuthenticationHandler<TOptions> : AuthenticationHandler<TOptions>, IAuthenticationHandler, IAuthenticationRequestHandler where TOptions : RemoteAuthenticationOptions, new() {
+ protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder);
- protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider on AuthenticationSchemeOptions instead.")]
+ protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
}
public abstract class SignInAuthenticationHandler<TOptions> : SignOutAuthenticationHandler<TOptions>, IAuthenticationHandler, IAuthenticationSignInHandler, IAuthenticationSignOutHandler where TOptions : AuthenticationSchemeOptions, new() {
+ public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder);
- public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider on AuthenticationSchemeOptions instead.")]
+ public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
}
public abstract class SignOutAuthenticationHandler<TOptions> : AuthenticationHandler<TOptions>, IAuthenticationHandler, IAuthenticationSignOutHandler where TOptions : AuthenticationSchemeOptions, new() {
+ public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder);
- public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
+ [ObsoleteAttribute("ISystemClock is obsolete, use TimeProvider on AuthenticationSchemeOptions instead.")]
+ public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock);
}
- public class SystemClock : ISystemClock
+ [ObsoleteAttribute("Use TimeProvider instead.")]
+ public class SystemClock : ISystemClock
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Microsoft.AspNetCore.Authorization

``` diff
namespace Microsoft.AspNetCore.Authorization {
- [AttributeUsageAttribute(68, AllowMultiple=false, Inherited=true)]
- public class AllowAnonymousAttribute : Attribute, IAllowAnonymous {
+ [AttributeUsageAttribute(68, AllowMultiple=false, Inherited=true)]
+ [DebuggerDisplayAttribute("{ToString(),nq}")]
+ public class AllowAnonymousAttribute : Attribute, IAllowAnonymous {
+ public override string ToString();
}
public class AuthorizationMiddleware {
+ public AuthorizationMiddleware(RequestDelegate next, IAuthorizationPolicyProvider policyProvider, IServiceProvider services, ILogger<AuthorizationMiddleware> logger);
}
public class AuthorizationResult {
- public bool Succeeded { get; }
+ [MemberNotNullWhenAttribute(false, "Failure")]
+ public bool Succeeded { [MemberNotNullWhenAttribute(false, "Failure")] get; }
}
- [AttributeUsageAttribute(68, AllowMultiple=true, Inherited=true)]
- public class AuthorizeAttribute : Attribute, IAuthorizeData {
+ [AttributeUsageAttribute(68, AllowMultiple=true, Inherited=true)]
+ [DebuggerDisplayAttribute("{ToString(),nq}")]
+ public class AuthorizeAttribute : Attribute, IAuthorizeData {
+ public override string ToString();
}
+ public interface IAuthorizationRequirementData {
+ IEnumerable<IAuthorizationRequirement> GetRequirements();
+ }
}
```

Loading
Loading