<?php
require_once '/var/www/sites/CAS-1.3.4/CAS.php';
phpCAS::setDebug();// Enable verbose error messages. Disable in production!phpCAS::setVerbose(true);// Initialize phpCASphpCAS::client(CAS_VERSION_2_0, 'access.example.com', 443, '/cas');
phpCAS::setNoCasServerValidation();
// force CAS authenticationphpCAS::forceAuthentication();
echo "It worked";?>username=Randomuser&password=Randompassword
service=http%3A%2F%2Ftest.example.com%2Fcastest.php
0000: 53 54 2D 32 31 2D 79 47 59 69 57 6E 63 45 62 65 | ST-21-yGYiWncEbe |0010: 70 78 78 71 33 4B 6E 78 4F 52 2D 63 61 73 32 2E | pxxq3KnxOR-cas2. |0020: 69 6E 6D 61 72 2E 63 6F 6D | example.com |
<html><head><title>CAS Authentication failed!</title></head><body><h1>CAS Authentication failed!</h1><p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="http://test.example.com/castest.php">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:root@localhost">the administrator of this site</a>.</p><hr><address>phpCAS 1.3.4 using server <a href="https://access.example.com/cas/">https://access.example.com/cas/</a> (CAS 2.0)</a></address></body></html><br /><b>Fatal error</b>: Uncaught exception 'CAS_AuthenticationException' in /var/www/sites/vmbuild/CAS-1.3.4/CAS/Client.php:3234Stack trace:#0 /var/www/sites/vmbuild/CAS-1.3.4/CAS/Client.php(1419): CAS_Client->validateCAS20('https://access....', '\n\n<cas:serviceR...', Object(DOMElement), false)#1 /var/www/sites/vmbuild/CAS-1.3.4/CAS.php(1127): CAS_Client->isAuthenticated()#2 /var/www/sites/vmbuild/castest.php(21): phpCAS::isAuthenticated()#3 {main} thrown in <b>/var/www/sites/vmbuild/CAS-1.3.4/CAS/Client.php</b> on line <b>3234</b><br /><cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas"><cas:authenticationFailure code="INVALID_TICKET">Ticket 'ST-21-yGYiWncEbepxxq3KnxOR-cas2.example.com' not recognized</cas:authenticationFailure></cas:serviceResponse>--
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 cas-user+u...@apereo.org.
To post to this group, send email to cas-...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/f68da54d-dde3-4f88-8428-7ca9eff54d72%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.
<html><head><title>CAS Authentication failed!</title></head><body><h1>CAS Authentication failed!</h1><p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="http://test.example.com/castest.php">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:ro...@localhost">the administrator of this site</a>.</p><hr><address>phpCAS 1.3.4 using server <a href="https://access.example.com/cas/">https://access.example.com/cas/</a> (CAS 2.0)</a></address></body></html><br />
<b>Fatal error</b>: Uncaught exception 'CAS_AuthenticationException' in /var/www/sites/vmbuild/CAS-1.3.4/CAS/Client.php:3234Stack trace:#0 /var/www/sites/vmbuild/CAS-1.3.4/CAS/Client.php(1419): CAS_Client->validateCAS20('https://access....', '\n\n<cas:serviceR...', Object(DOMElement), false)#1 /var/www/sites/vmbuild/CAS-1.3.4/CAS.php(1127): CAS_Client->isAuthenticated()#2 /var/www/sites/vmbuild/castest.php(21): phpCAS::isAuthenticated()#3 {main}thrown in <b>/var/www/sites/vmbuild/CAS-1.3.4/CAS/Client.php</b> on line <b>3234</b><br />
Other things i've tried were to use the validation url to validate the ticket that way but it says the ticket is not reconigzed:
Get or Post:<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas"><cas:authenticationFailure code="INVALID_TICKET">Ticket 'ST-21-yGYiWncEbepxxq3KnxOR-cas2.example.com' not recognized</cas:authenticationFailure></cas:serviceResponse>
Just need to validate service tickets with/for the REST API any help would be appreciated.
/serviceValidate.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/daf30452-61dd-4187-9ebd-dfc17de37404%40apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/6019fd5b-6795-400e-9bc4-fbd4486f12e6%40apereo.org.
Why multiple times? What's the story there?
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/318d0846-f1b6-4155-8d86-ded2013d2391%40apereo.org.
You’re thinking about this the right way; just not execution wise. You can have an ST be valid multiple times of course as this is controlled by its policy. However, what you’re really doing is treating an ST like an OAuth access token, which it isn’t….or it’s not meant to be. Your better options are to use proxying where you get a PGT, and you get PTs based on that PGT you get. (The PGT becomes your access token).
Or you just use the OAuth support...or some other form of non-interactive AuthN.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/d0560d02-aa00-47e0-929c-430f117cde0a%40apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/005101d1cb03%24c738bda0%2455aa38e0%24%40unicon.net.
It can be done. There are no plans to port this back, but if you’re willing to do the work that’s perfectly fine.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/ff062091-e5fb-4c39-9bb9-f3c08c4830e7%40apereo.org.
I don’t know what far off would be to you. See https://github.com/apereo/cas/milestones
Basically, examine how 5 works. Make sure it actually works! Then port back. It will probably be easier if you just started with 5 now and tested it. M2 is now available.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/75332a10-7e0c-4878-84ec-98a877815389%40apereo.org.