CAS Setup Error
Brought to you by:
jberanek
MRBS Version 1.9.0
When setting the session and auth types to 'cas', there are a number of errors generated:
Error:
Uncaught exception 'CAS_OutOfSequenceBeforeClientException' in /home/user/_repo/mrbs-1.9.0/web/lib/CAS.php at line 1854
this method cannot be called before phpCAS::client() or phpCAS::proxy()
#0 /home/user/_repo/mrbs-1.9.0/web/lib/CAS.php(1162): phpCAS::_validateClientExists()
#1 /home/user/_repo/mrbs-1.9.0/web/lib/MRBS/Session/SessionCas.php(19): phpCAS::isAuthenticated()
#2 /home/user/_repo/mrbs-1.9.0/web/mrbs_auth.inc(156): MRBS\Session\SessionCas->getCurrentUser()
#3 /home/user/_repo/mrbs-1.9.0/web/mrbs_auth.inc(198): MRBS\getAuthorised(1, 'https://reserva...')
#4 /home/user/_repo/mrbs-1.9.0/web/edit_entry.php(1181): MRBS\checkAuthorised('edit_entry.php')
#5 {main}
This happens because web/lib/MRBS/Session/SessionCas.php doesn't set up the phpCAS Client before calling checkAuthentication().
My workaround:
class SessionCas extends SessionWithLogin
{
public function __construct()
{
\MRBS\auth();
parent::__construct();
}
If anyone wants access to a CAS server to test, I now have one I can share - let me know.
Thanks. Yes please, if you could give me access to a CAS server for testing purposes that would be great. You can send the details by private message.
Why does SourceForge never remember that I am logged in right as I post a ticket? Subscribing.
Thanks. Now fixed in 64627e.
Fixed in MRBS 1.9.1.