Skip to content

Commit

Permalink
small follow up to PR #326
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmunro committed Mar 14, 2019
1 parent 7210fee commit 4d0e0e4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions hm3.sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,14 @@ disable_ini_settings=false
; Don't use a browser fingerprint
disable_fingerprint=false

; You can create your own custom authentication and session classes using the
; site module set, however you might want those classes located somewhere else
; outside of the Cypht code base. By setting session_type and auth_type to custom,
; you can control what class is used with the following settings

; auth_class=
; session_class=


; -----------------------------------------------------------------------------
; DB Support
Expand Down
2 changes: 2 additions & 0 deletions lib/dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ private function render_output() {
$class = $this->site_config->get('output_class', 'Hm_Output_HTTP');
$renderer = new $class;
$content = $formatter->content($this->module_exec->output_response, $this->request->allowed_output);
/* TODO: might be a good idea to use a custom render class that can return
* the output on demand */
$this->output = $renderer->send_response($content, $this->module_exec->output_data);
}

Expand Down
3 changes: 2 additions & 1 deletion lib/session_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ private function standard_auth() {
* @return string|false
*/
private function custom_auth() {
if ($this->auth_type == 'custom' && Hm_Functions::class_exists('Custom_Auth')) {
$custom_auth_class = $this->config->get('auth_class', 'Custom_Auth');
if ($this->auth_type == 'custom' && Hm_Functions::class_exists($custom_auth_class)) {
return 'Custom_Auth';
}
return false;
Expand Down

0 comments on commit 4d0e0e4

Please sign in to comment.