Using OAuth User sessions instead of cookies in APIs

Previously we were using cookies to find the logged user’s profile id for the Endpoints since we haven’t completed the authentication part.

But now we can get the currently logged users details from the OAuth user session details. So I’m replacing the cookie value annotations with AuthenticationPrincipal annotations.

( Btw, we need to find a way to integrate the two modules before doing this change. Otherwise the frontend will break. If anyone have some idea on this please let me know. @EngTeam )

1 Like

I sent a draft pull request for this. Still I’m searching for a way to do the unit tests with Mock user.