How to get the Username AND Password of a user in Citrix Web Interface 4.0

14

Have you ever wanted to get the username and password from an authenticated user in Citrix Web Interface? This article tells you exactly how to do just that.

Have you ever wanted to get the username and password from an authenticated user in Citrix Web Interface? I was once tasked to grab the username and password of the authenticated Citrix Web Interface user and pass those credentials along to a custom Lotus Notes web application. Using the Web Interface SDK (available at http://apps.citrix.com/cdn/sdk/webinterface_sdk.asp), I was able to get just what I needed. Here is how it’s done:

The down and dirty explanation
The first thing you’ll need to understand is the object model Citrix uses in Web Interface. Citrix provides you with a lot of base classes you can use to programmatically get the information you need. All these classes are documented in the SDK. The class we’re interested in for this example is the AccessToken class. The AccessToken class allows you to get the user’s username (but not the user’s password). To get the user’s password, you’ll need to use the PasswordBasedToken Interface. The AccessToken class implements the PasswordBasedToken interface which exposes a method called getPassword(). This method returns a string that is the user’s password. Check out the code below:

The code
<%
PasswordBasedToken pbt = null;
AccessToken ac = authGetPrimaryAccessToken();
pbt = (PasswordBasedToken)ac;

string strUsername = ac.getShortUserName();
string strPassword = pbt.getPassword();
%>

That was easy (almost too easy).
Notice the use of the authGetPrimaryAccessToken(). This is a function that Citrix gives you to get the primary access token holding the credentials the user used to authenticate to Web Interface. This function can be found at path_to_your_wi_server\site\serverscripts\authentication.cs and path_to_your_wi_server\auth\serverscripts\authentication.cs

The code placement
Ok, now you know the down and dirty explanation and the code used to get the username and password. So, where do you put this code? One place you could use is the layout.ascx file located at path_to_your_wi_server\site\include. Layout.ascx is a user control that constructs the look and feel of the Web interface page after authentication (see this article for more information). Just place the code before the tag. Now you can use the variables strUsername and strPassword wherever you like in the code.

Putting it all together
Here is the final product

Layout.ascx

<%

PasswordBasedToken pbt = null;
AccessToken ac = authGetPrimaryAccessToken();
pbt = (PasswordBasedToken)ac;
string strUsername = ac.getShortUserName();
string strPassword = pbt.getPassword();
%>

<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
  <meta NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW, NOARCHIVE">
  <title><%=PageTitle%></title>
. . .

I hope this helps some of you out there trying to bring together disparate systems.

14 thoughts on “How to get the Username AND Password of a user in Citrix Web Interface 4.0

  1. Do you have any suggestions on how to pass this authentication when using the WISP for SharePoint Services? We have the WISP working with SPS but it prompts you to login again when you launch your first Citrix app. Thanks for any information.

  2. This is what was logged when I turned off the custom error mode. Can you anyone tell me what is going wrong?

    Server Error in ‘/Citrix/AccessPlatform’ Application.
    ——————————————————————————–

    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0103: The name ‘authGetPrimaryAccessToken’ does not exist in the current context

    Source Error:

    Line 13:
    Line 14: // Retrieve the username of the current logged in user
    Line 15: strUsername = ((AccessToken)authGetPrimaryAccessToken()).getShortUserName();
    Line 16:
    Line 17: // Work around to get real client IP address (http://www.thomaskoetzing.de/index.php?option=com_content&task=view&id=64&Itemid=103)

    Source File: c:\Inetpub\wwwroot\Citrix\AccessPlatform\site\serverscripts\WIACC.cs Line: 15

    Show Detailed Compiler Output:

    c:\windows\system32\inetsrv> "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\a4ce21a8\a0e08392_3ab8c901\DotNetSSLSDKWrapper.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\d55da2d3\a88fb392_3ab8c901\utils.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\4bad2a6c\1019bd92_3ab8c901\xmlclient.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\c032e484\ae078b92_3ab8c901\localization.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\f10a3694\2a307392_3ab8c901\AuthenticatorsDotNet.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\18329ba6\38577a92_3ab8c901\clientdetect.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\7d236303\5c54b892_3ab8c901\webpnapi.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\c6a30c44\1c096c92_3ab8c901\aspnetcpmclient.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\b96430b3\38577a92_3ab8c901\Citrix.Platform.Authentication.InboundSingleSignOn.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\2a469c3c\0ee26492_3ab8c901\ApplyAccessPrefs.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\44b6742d\bc2e9292_3ab8c901\MpsSourceImpl.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\ac55ec07\c2a66992_3ab8c901\aspnetageclient.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\c341c41f\467e8192_3ab8c901\ConnectionRoutingProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\7bd75448\24b89b92_3ab8c901\pnagentimpl.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_SubCode_PagesJava.knuaf1oq.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\3746b5ac\d87ca092_3ab8c901\radeimpl.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\2615b696\92b97c92_3ab8c901\ClientProxyProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\dc427aa7\4e2db192_3ab8c901\Utilities.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\74183c13\b6b6ba92_3ab8c901\wingapi.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\dbcc9e3f\def47792_3ab8c901\CachingProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\2f8b58c3\70f39692_3ab8c901\mvccommon.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\cace945d\d87ca092_3ab8c901\RedirectionHandler.DLL" /R:"C:\WINDOWS\assembly\GAC_32\vjslib\2.0.0.0__b03f5f7f11d50a3a\vjslib.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\e0d4b7bd\086a8d92_3ab8c901\log4net.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\27facfbf\32dfa292_3ab8c901\shared.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\1239560a\d0cd7092_3ab8c901\AuthenticationState.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\60919941\5c54b892_3ab8c901\webpnimpl.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\20a6cf6c\54a58892_3ab8c901\FTAProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_Code.q_8h2bzh.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\bda74437\766b6e92_3ab8c901\AuthenticationFilter.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\31e75915\6a7bbf92_3ab8c901\xms1rt.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\0c9d9263\ec1b7f92_3ab8c901\config.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\f061151c\16919492_3ab8c901\mvcasp.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\bf7e49c0\a0e08392_3ab8c901\coreapi.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\c93066a7\4006aa92_3ab8c901\Spring.Core.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\f7ff5932\d0cd7092_3ab8c901\AuthenticatorsCommon.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\58ffcc9b\68446792_3ab8c901\ASPNetAdaptor.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_Web_wq7oqmv6.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\cd8cf042\1c096c92_3ab8c901\aspnetenvironment.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\a655685d\c4ddc192_3ab8c901\xmsgen.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\c7d227e5\b47f6292_3ab8c901\AccessTokens.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\09e886fe\84927592_3ab8c901\BandwidthControlProvider.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\a3d0eeb8\f4caae92_3ab8c901\TwoFactor.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\66e0806b\02f2b592_3ab8c901\webinterface.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\80b876ad\f4caae92_3ab8c901\Tracing.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\def0b787\ca559992_3ab8c901\netsslsdk.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\5fffc2ea\8c41a592_3ab8c901\SimpleAggregator.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_SubCode_PagesCs.k9azkwxg.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\4c69a27b\62cc8f92_3ab8c901\MpsSourceApi.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\8583f2d7\7e1a9e92_3ab8c901\RadeAPI.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\1098fa8f\9a68ac92_3ab8c901\Support.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\d224f521\fa428692_3ab8c901\dotnetsupport.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\9777da3d\8c41a592_3ab8c901\Socks5.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\b4d764e9\ca559992_3ab8c901\pnagentapi.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\assembly\dl3\520d19ee\54a58892_3ab8c901\IconCache.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_global.asax.vdcpios8.dll" /out:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_Web_default.aspx.e322493f.1tylog_t.dll" /debug- /optimize+ /w:4 /nowarn:1659;1699;1701 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_Web_default.aspx.e322493f.1tylog_t.0.cs" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\citrix_accessplatform\11d54ebb\5bd22843\App_Web_default.aspx.e322493f.1tylog_t.1.cs"

    Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.1433
    for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
    Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

    c:\Inetpub\wwwroot\Citrix\AccessPlatform\site\serverscripts\WIACC.cs(15,29): error CS0103: The name ‘authGetPrimaryAccessToken’ does not exist in the current context

    Show Complete Compilation Source:

    Line 1: <%
    Line 2:
    Line 3: // Modify the following line to reflect your database connection settings
    Line 4: string strConnString = "Data Source=app01;Initial Catalog=Citrix_Portal_Access;Persist Security Info=True;User ID=Citrix_Portal;Password=Citrix_Portal";
    Line 5:
    Line 6: System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection();
    Line 7: conn.ConnectionString = strConnString;
    Line 8:
    Line 9: bool boolAllowed = false;
    Line 10: string strUsername = String.Empty;
    Line 11: string clientIP = String.Empty;
    Line 12:
    Line 13:
    Line 14: // Retrieve the username of the current logged in user
    Line 15: strUsername = ((AccessToken)authGetPrimaryAccessToken()).getShortUserName();
    Line 16:
    Line 17: // Work around to get real client IP address (http://www.thomaskoetzing.de/index.php?option=com_content&task=view&id=64&Itemid=103)
    Line 18: if (!(Request.ServerVariables["HTTP_X_FORWARDED_FOR"] == null) && (Request.ServerVariables["REMOTE_ADDR"] == "127.0.0.1"))
    Line 19: {
    Line 20: clientIP = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
    Line 21: }
    Line 22: else
    Line 23: {
    Line 24: clientIP = Request.ServerVariables["REMOTE_ADDR"];
    Line 25: }
    Line 26:
    Line 27:
    Line 28: try
    Line 29: {
    Line 30: conn.Open();
    Line 31: string strSQL = string.Format("SELECT COUNT(username) FROM WI_Include WHERE username='{0}’", strUsername);
    Line 32: System.Data.SqlClient.SqlCommand sqlCmd = new System.Data.SqlClient.SqlCommand(strSQL, conn);
    Line 33:
    Line 34: int numRows = (int)sqlCmd.ExecuteScalar();
    Line 35:
    Line 36: // If the user is not allowed to log in, log the access attempt in the database
    Line 37: if(numRows < 1)
    Line 38: {
    Line 39: boolAllowed = false;
    Line 40: string strSQLDenied = string.Format("INSERT INTO WI_AccessLog (username, logintime, remote_addr, success) VALUES (‘{0}’, ‘{1}’, ‘{2}’, ‘{3}’)", strUsername, DateTime.Now.ToString(), clientIP, "no");
    Line 41: System.Data.SqlClient.SqlCommand sqlCmdDenied = new System.Data.SqlClient.SqlCommand(strSQLDenied, conn);
    Line 42: sqlCmdDenied.ExecuteNonQuery();
    Line 43: }
    Line 44: else
    Line 45: {
    Line 46: boolAllowed = true;
    Line 47: string strSQLAllowed = string.Format("INSERT INTO WI_AccessLog (username, logintime, remote_addr, success) VALUES (‘{0}’, ‘{1}’, ‘{2}’, ‘{3}’)", strUsername, DateTime.Now.ToString(), clientIP, "yes");
    Line 48: System.Data.SqlClient.SqlCommand sqlCmdAllowed = new System.Data.SqlClient.SqlCommand(strSQLAllowed, conn);
    Line 49: sqlCmdAllowed.ExecuteNonQuery();
    Line 50: }
    Line 51: }
    Line 52:
    Line 53: catch
    Line 54: {
    Line 55: }
    Line 56:
    Line 57:
    Line 58: finally
    Line 59: {
    Line 60: conn.Close();
    Line 61: }
    Line 62:
    Line 63:
    Line 64: if(!boolAllowed)
    Line 65: {
    Line 66: Server.Transfer("../../auth/errorPage.html");
    Line 67: }
    Line 68:
    Line 69: %>

    ——————————————————————————–
    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

  3. I work for a large healthcare organization where i developed our own single sign-on portal for physicians and employees.

    With very few exceptions employees login once to this portal and I sign them into everything else. This portal runs in IE and we want to make it available to physicians via the Ipad.

    I’ve written my own WI portal from scratch and am very familiar with the SDK and am working on a custom pnagent site where I can pass their encrypted userid/password into our portal using our own encryption via the LongCommandline setting in the ICA file. The roadblock i’ve encountered is that I can’t get a valid passwordbased token from the requestinfo object – only a MPSauthTicket and calling getTicketPassword from there only gives me the password part of the ticket. I know that the agent passes the full password to the pnagent site, but for the life of me I can’t figure how to get to it…

  4. Yes, the end user starts the Receiver on the Ipad. The published app is our own custom "IE" web browser. We encrypt (rijndael) their timestamped credentials into the commandline via the LongcommandLine. If no valid timestamped credentials are supplied, the portal prompts them to login, which is what i’m trying to avoid. If I can modify the Services Site so that I can extract a valid passwordbased token (or decrypt the password in the enum request and or launch request) I can encrypt it and forward it on to the published application.

  5. We use IIS, but:
    1. Portal runs primarily in clinical arena where pc’s run with generic logins.
    2. The portal itself needs their credentials for sso to a number of other portals that don’t utilise integrated auth.
    3. These docs in houston really don’t like logging in multiple times…

  6. Hi ,

    Is there any method or API to get the CITRIX user name and password in PHP once user logged in CITRIX environment. .

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *