We just saw how you can retrieve session data, but in a similar fashion, you can also put your own data into the session. The following is a function that does that:
AddSessionUser g_cookie,"User","Password","Repository"
The function AddSessionUser
resides in \Von\InternalSite\Inc\SessionMgr.inc
, and as you've probably guessed, is used to add a user's submitted credentials into the session, so as to use them later for single sign on. By invoking this function ourselves in PostPostValidate.inc
, we can also take advantage of this to add extra credentials into the session for any chosen repository. What would that be good for, do you ask? Well, one good example is when users are required to authenticate to an application that does not use the same repository that a trunk is configured with for initial login. In this scenario, the application would need credentials that it can expect to validate and authenticate against whatever directory or scheme it is configured...