Can Core.getActiveSession(username) return almost expired session?

0
I'm looking at Community Commons executeMicroflowAsUser. It calls Core.getActiveSession(username) and if found, calls session.createContext(). If the session was about to expire is it possible that it will expire right before the call to createContext() or does getActiveSession() keep it alive? The other question: can Core.getActiveSession() return a previously created web browser session and can this prolong its life? Or the other way around, can clicking "logout" destroy this session (which was supposed to be used in scheduled tasks and such)?
asked
0 answers