Greetings.
I am looking for some sort of documentation or other source of help for how
to properly use the Authorization Interrupt with a REST page response. I
am able to see the CAS server calling my REST application, and I am able to
appropriately process the call on the application, and the result is a
straight JSON file in the exact same syntax as the interrupt.json file.
If I use the same information that I am returning from my REST app in the
json file, everything works like I would expect. But the returned JSON
does NOT follow the rules that are set in the json code. It does recognize
the specific user and only processes that user, but the rest of the rules
are not followed.
Here is what I am returning (with example 'testuser'):
<?php
if ($_GET["username"] == "testuser"){
header("HTTP/1.1 200 OK");
header('Content-Type:application/json');
$array = array("testuser" => array(
"message" => "This is the announcement message that will tell
people what to do",
"links" => array(
"Yahoo Link" => urlencode("https://www.yahoo.com"),
"Google Link" => urlencode("https://www.google.com")
),
"block" => false,
"ssoEnabled" => false,
"interrupt" => true,
"autoRedirect" => false,
"autoRedirectAfterSeconds" => -1
));
echo urldecode(json_encode($array));
}
?>
If I put this json layout into the interrupt.json file, it works as it
should (the message appears, the links appear, etc). But when I call this
php file, it sees that testuser is the user in play and it does interrupt
the login, but the content is the default interrupt information with no
custom message, no links.
Has anyone had any success with the interrupt settings and REST? Any help
would be fabulous!
Shawn
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/7329613a-c5f1-4a15-b9fd-340dfad68331%40apereo.org.