This is custom code. Use the cookie authentication middleware to cache the user's identity and any other information your application needs to authorize users. It's up to you to write the login HTML and code to authenticate using LDAP. The cookie authentication middleware works with the standard authorization features in ASP.NET Core.
Use cookie authentication without ASP.NET Core Identity
Introduction to authorization in ASP.NET Core
LDAP authentication in ASP.NET Core MVC