Solved

Bypass CAS authentication because of a redirect?

Posted on 2014-10-06
1
183 Views
Last Modified: 2014-10-18
On our website, we use the CAS Module to athenticate.

But I need to put in a redirect to pass the visitors to another site first.

But the CAS challenge seems to kick before the redirect takes effect.

How can I bypass?

// rev. 10-06-2014, 10AM
// This code redirects Visitor to Hallways' Welcome page.
// Visitor will authenticate into OMB MAX via Hallways, then get a pass-thru to Navigator site.
// Navigator, because of the CAS Module, will accept the incoming authentication, 
// so the User will already be signed in to OMB MAX when they land on Navigator home page.

<?php
$ref = $_SERVER["HTTP_REFERER"];
if ( $ref == 'https://hallways-dev.fas.gsa.gov/hallways/navtest' )
{
		if (isset($_SESSION['phpCAS']['attributes']['samlAuthenticationStatementAuthMethod'])) {
		 echo "you came from hallways -- defined - you are authenticated in cas - stay here";
		} else {
		echo "you came from hallways -- but -- not defined in cas";
		//header("Location:https://hallways-dev.fas.gsa.gov/hallways/homepage/welcome.html");
		//exit;
		}
}
else
{
header("Location:https://hallways-dev.fas.gsa.gov/hallways/homepage/welcome.html");

}
?>

Open in new window

0
Comment
Question by:sandshakimi
1 Comment
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
Comment Utility
If I understand what you're asking for, there is not any succinct and consolidated answer to this question.  This seems to be conceptually similar to advertising networks -- servers with different URLs are able to share data about the client via a network of databases and redirects that are designed to get around the same-origin limitations of cookies and JavaScript.  I'm thinking you might want to learn about DoubleClick and take its designs into account.
http://www.google.com/doubleclick/
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now