I've written my custom authentication module by following the examples in the documentation. I have it working, but I've noticed that if a user enters their password incorrectly they are redirected to the error.php that is in the /templates/error.php. However, this does not allow the user to attempt to log back in unless they hit the back button which is not a great experience. And on top of it, the AuthState parameter is lost once you go to the error page.
So I wanted to see what is recommended way to handle this? Should my code throw an exception when the user doesn't authenticate? Is there a way to get back to the loginuserpass.php page and not lose the AuthState parameter?
Thanks.
Hrm, I must be doing something wrong, cause while I am coming to loginuserpass.php, I am getting this message and not getting the form to try to login again.
In my Authentication module's login method, I do my logic and if the user does not authenticate then I throw an exception.throw new Exception('Unable to login in user');$show_function = $config->getArray('errors.show_function', NULL);
if (isset($show_function)) {
assert('is_callable($show_function)');
call_user_func($show_function, $config, $data);
assert('FALSE');
} else {
$t = new SimpleSAML_XHTML_Template($config, 'error.php', 'errors');
$t->data = array_merge($t->data, $data);
$t->show();
}
--
This is a mailing list for users of SimpleSAMLphp, not a support service. If you are willing to buy commercial support, please take a look here:
https://simplesamlphp.org/support
Before sending your question, make sure it is related to SimpleSAMLphp, and not your web server's configuration or any other third-party software. This mailing list cannot help with software that uses SimpleSAMLphp, only regarding SimpleSAMLphp itself.
Make sure to read the documentation:
https://simplesamlphp.org/docs/stable/
If you have an issue with SimpleSAMLphp that you cannot resolve and reading the documentation doesn't help, you are more than welcome to ask here for help. Subscribe to the list and send an email with your question. However, you will be expected to comply with some minimum, common sense standards in your questions. Please read this carefully:
http://catb.org/~esr/faqs/smart-questions.html
---
You received this message because you are subscribed to a topic in the Google Groups "SimpleSAMLphp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simplesamlphp/e6GQzeqjlgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simplesamlph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simplesamlphp/a763861d-c13c-4d29-bab8-0e99bf63b4f9n%40googlegroups.com.
