...
Storing session id and mapping it with User Id in cassandra (where portal store sessions)
Cassandra TTL might delete the other mapped data (not sure NOC team says they dont add explicit TTL currently).
Fetch user details should give details of parent if parent exists
How to do in mobile
How mobile will support offline swtich (as switch requires to generate token)
Conclusion
Parent’s token will be used and child’s token will not be generated.
Session data to be updated with child user profile data. Just changing the session data is required no need to change cookie and generate new session.
Re initialisation of telemetry server and user service.
Back end to check before switching and allow switch only if it is valid switch meaning there either of following relation for a valid switch.
1. child - child
2. parent - child