How do I view session creation logic during login process

suneramun8 days ago

To preface, I am a beginner and still familiarizing myself with the interface, documentation and the code. Please do not hesitate to point me towards documentation material if needed.

I came across this login method located inside the LoginService.java class.

public LoginResult login(String email, String password, Integer code) throws StorageException { <method body> }

Where exactly can I find the session creation logic inside the method? My intentions are to replace both the email and password values, and instead temporarily introduce an integer "userLoginId" which can be used to create a new session. (The userLoginId will be later changed to a token by something like AWS Cognito.)

Any pointers on how I can replace the email and password with my custom id?

Anton Tananaev7 days ago

There's no session creation inside this method.

suneramun7 days ago

Could you point me towards the general direction of where I need to look for session creation? I did some more digging around in the LoginService.java class, and realized that returning a LoginResult object with a user object as an argument manages to always create a new session. But, I'm still stuck on how I can invoke a new session through a given String such as "userLoginID"

A set of classes for me to look into will be enough too.

Anton Tananaev7 days ago

We don't create new sessions. We just assign user id to an existing session. Session is created automatically by Jetty.