Populate Last & Current Sign-In IP from Session API
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Description
When a user is authenticated using Gitlab API, Current & Last sign-in IP fields are not populated to reflect actual sign in attempts. Sign-in count is also not being incremented.
Proposal
Add a parameter in Gitlab session API so when authenticating a user through Session API we can pass his/her actual IP address. API should save the current date of server for Current sign-in at and Last sign-in at fields as well as incrementing Sign-in count by one upon successful authentication.
Links / references
https://docs.gitlab.com/ee/api/session.html
Documentation blurb
When a web portal is designed to expose features of gitlab in a custom way, user logins need to be stored in a way similar to user login from main portal. To support this feature a parameter must be added to session API so that initiator passes actual IP address of user. This IP with corresponding login date are then recorded and shown in user info page (admin/users/{username}).
Optional client_ip attribute of string type can be passed when calling session API (https://gitlab.example.com/api/v4/session).
Example:
curl --request POST "https://gitlab.example.com/api/v4/session?login=john_smith&password=strongpassw0rd&client_ip=1.2.3.4"