The server needs to authenticate each request in order to know which user the request belongs to.
What I can think of is passing the user ID in each request method, but if there are too many request methods, a lot of such logic code needs to be written.
Is there a way to pass headers when the client connects?