Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Bypass CAS authentication because of a redirect?

Posted on 2014-10-06
1
Medium Priority
?
232 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 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 40363795
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

885 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