@Override protected void onDestroy(@Nonnull final IScope aScopeInDestruction) { // Called when the session is destroyed // -> Ensure the user is logged out! // Remember stuff final LoggedInUserManager aOwningMgr = m_aOwningMgr; final String sUserID = m_sUserID; _reset(); // Finally logout the user if (aOwningMgr != null) aOwningMgr.logoutUser(sUserID); }
private void readObject(@Nonnull final ObjectInputStream aOIS) throws IOException, ClassNotFoundException { aOIS.defaultReadObject(); // Resolve user ID if (m_sUserID != null) { m_aUser = PhotonSecurityManager.getUserMgr().getUserOfID(m_sUserID); if (m_aUser == null) throw new IllegalStateException("Failed to resolve user with ID '" + m_sUserID + "'"); } // Resolve manager m_aOwningMgr = LoggedInUserManager.getInstance(); }
public void onSessionDidActivate(@Nonnull final ISessionWebScope aSessionScope) { // Finally remember that the user is logged in m_aOwningMgr.internalSessionActivateUser(m_aUser, aSessionScope); }