Creating mock user APIs

Since we the authorization part for the scholarX platform is not available yet, we have discussed to mock user APIs using a cookie in the session until the authentication part is done.

Requirement:
Manually adding the profile id of the user to the session as a cookie
Using it for the APIs which requires the logged in user’s profile id

Solution:
Creating and temporary endpoint to set a cookie (or just set a cookie by a browser plugin)
Update the APIs to get the profile id from cookie

Is there anything to add? @EngTeam

2 Likes

Added 3 new Endpoints for this.

  1. To get current user’s mentoring programs
  2. To get the current user’s menteeing programs
  3. To get the current user’s profile
1 Like

I used @CookieValue annotation for this. And also created Introspection Controller and introspection service for the new Endpoints.

Please review and merge

1 Like