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 ThinRDP, to show you how to integrate ThinRDP in a single-sign-on schema.

 

Download this demo here. The website demo is accessible from the Users documents folder, under the directory \ThinRDP 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 ThinRDP work.

 

The ASP.NET login page for CAS user validation uses the oficial dot-net CAS Client and the ThinRDP ApiKey logon feature. The first one takes care of the CAS login validation while the other one makes sure ThinRDP 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 ThinRDP 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 ThinRDP 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 ThinRDP 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 ThinRDP is running.

 

Remember also to map the CAS users to the ThinRDP users in order to make the integration work properly.