Recently I was called to assist with an interesting SSO customization for UAG. The requirments are as follows:
a. Add suffix field to login page
b. Add code field to login page
<TD class="paramText">Code</TD> <TD><INPUT class="paramTextbox" TYPE="text" ID="Code_Value" NAME="Code_Value" size="11"></TD>
Step #3
<%
if Session("CredentialsNum") = "" then if g_login_type = RESOURCE_OPERATION_LOGIN and GetSiteFixRepositories() then use_the_same_user_name = GetSiteUseTheSameUserName() repositories = GetSiteRepositoriesVec() i = 1 for each repository_name in repositories Session("repository"&i) = repository_name i = i + 1 next
i = 1 for each password in Request("password") Session("password"&i) = password if use_the_same_user_name then Session("user_name"&i) = Request("user_name") end if i = i + 1 next if not use_the_same_user_name then i = 1 for each user_name in Request("user_name") Session("user_name"&i) = user_name i = i + 1 next end if
Session("CredentialsNum") = i-1 else Session("repository1") = Request("repository") x1 = Request("user_name") x2 = Request("pre_fix") Session("user_name1") = x2 & x1 Session("password1") = Request("password") Session("CredentialsNum") = 1 end if Session("CurrentCredentialsNum") = 1 end if
num = Session("CurrentCredentialsNum") user_name = Session("user_name"&num) password = Session("password"&num) repository = Session("repository"&num)
HEAVY_TRACE "CurrentCredentialsNum [" & num & "] CredentialsNum [" & Session("CredentialsNum") & "]"
HEAVY_TRACE "Validate got site_name [" & g_site_name & "] secure [" & g_secure & "] orig_url [" & g_orig_url & "] resource_id [" & g_resource_id & "] login_type [" & g_login_type & "] cookie [" & g_cookie & "] repository [" & repository & "] user_name [" & user_name & "]"
%>
Note: if you are using normal username / password authentication this code should be saved in /CustomUpdate/Trunk1postpostvalidate.inc and the code Session("user_name1") = Request("user_name") should be added to begining of InternalSite/Inc/sso.inc
Step #4
Place the following code in \Conf\WizardDefaults\FormLogin\CustomUpdate\formlogin.xml