Keycloak api that creates session for user with username or id and password ( from attributes )

Hellow guys,

in company, we are planning on refactoring the old project ( ASPX, .NET MVC ,… 10+ years ) to the new project which will use keycloak.

We will do it step by step, so all content is available all the time ( refactored and not refactored )

Since old project has manual session making etc. , i would like to use Old login page ( In database, for every user i would make 2 columns “Keycloak_id” and “Keycloak_pass” , which i would use to pass to api for creating session, so i would not have to login twice for same page.) Is there any API available, because i could not find one. Is there maybe better way that i didnt think about ?

Also it could be vice versa, so i would use new login, and add to attributes on user old username and old password, and create old way session which includes all the data of user from DB.

Greeting, Adnan