CAS demo

Top  Previous  Next

 

CAS is an authentication system created to provide a trusted way for an application to authenticate a user.  You can find more information about it under the link: http://www.jasig.org/cas

 

C# asp.net demo:

 

We have shipped an example demo along with Thinfinity® Remote Desktop Server, to show you how to integrate Thinfinity® Remote Desktop Server in a single-sign-on schema.

 

The website demo is accessible from the Users documents folder, under the directory \Thinfinity Remote Desktop Server Demos\CASAuth

In order to compile this application, you can use the Microsoft Visual C# Studio 2010 Express. Open the application from the menu File-Open Web Site.

You also need a CAS Server to make the integration with Thinfinity® Remote Desktop Server work.

 

The ASP.NET login page for CAS user validation uses the oficial dot-net CAS Client and the Thinfinity® Remote Desktop Server ApiKey logon feature. The first one takes care of the CAS login validation while the other one makes sure Thinfinity® Remote Desktop Server validates this user.

 

Before running the demo you need to modify three things:

 

1.In the login.aspx.cs, replace the CASHOST value with the URL of the CAS server.

 

// Local specific CAS host

private const string CASHOST = "https://casserver/";

 

2.On the Default.aspx.cs replace the URL in dhc.Init(“...”) with the URL of the Thinfinity® Remote Desktop Server.

 

dhc.Init("https://localhost:8443");

 

3.Finally, on the Default.aspx page, replace the first part of the URL specified as the iframe source (src) with the URL of the Thinfinity® Remote Desktop Server without removing the “/asp/? *<%=encQuery%>”, which is needed for the ApiKey validation.

 

<iframe src="https://localhost:8443/asp/?*<%=encQuery%>"></iframe>

 

 

NOTE: In order to use CAS you have to configure Thinfinity® Remote Desktop Server to use SSL encryption (HTTPS connection) and use a valid certificate, trusted by the CAS server. The same is true for the CAS server which needs to be accessible via an HTTPS connection and present a valid or trusted certificate by the server where Thinfinity® Remote Desktop Server is running.

 

Remember also to map the CAS users to the Thinfinity® Remote Desktop Server users in order to make the integration work properly.