Search code examples
ibm-mobilefirst

How do get userIdentity of current login request from list of all login users identities?


I want to restrict user for multiple login at a same time. Am following custom authentication method from below link

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/authentication-security/custom-authentication/

To achieve, I wanted know whether current login request is already logged in or not from some other device(session). Where or from which method am going get these details?

Please let me know how to get and return error custom message from this java file to adapter's calling method.


Solution

  • I don't believe any of the built-in APIs will provide what you are looking for.

    Instead, I think you need to create your own implementation from scratch. Meaning, create some database to store the current status of each user. Update it every time, check the status whenever someone tries to login ...