[GH-ISSUE #203] Dynamic auth #166

Closed
opened 2026-02-25 21:34:20 +03:00 by kerem · 4 comments
Owner

Originally created by @hartois on GitHub (Jun 14, 2017).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/203

Originally assigned to: @jasonmunro on GitHub.

In fresh code of function setup_auth($config):

    if ($auth_type == 'dynamic' && !in_array('dynamic_login', $config->get_modules(), true)) {
        Hm_Functions::cease('Invalid auth configuration');
    }
    if ($auth_type && in_array($auth_type, array('DB', 'LDAP', 'IMAP', 'POP3'), true)) {
        $auth_class = sprintf('Hm_Auth_%s', $auth_type);
    }
    elseif ($auth_type == 'custom') {
        $auth_class = 'Custom_Auth';
    }
   if (!$auth_class) {                  <<<<<<<<<<< with "dynamic" EXIT HERE
        Hm_Functions::cease('Invalid auth configuration');
    }
    else {
        return $auth_class;
    }

dynamic auth cannot be used

Originally created by @hartois on GitHub (Jun 14, 2017). Original GitHub issue: https://github.com/cypht-org/cypht/issues/203 Originally assigned to: @jasonmunro on GitHub. In fresh code of function setup_auth($config): ``` if ($auth_type == 'dynamic' && !in_array('dynamic_login', $config->get_modules(), true)) { Hm_Functions::cease('Invalid auth configuration'); } if ($auth_type && in_array($auth_type, array('DB', 'LDAP', 'IMAP', 'POP3'), true)) { $auth_class = sprintf('Hm_Auth_%s', $auth_type); } elseif ($auth_type == 'custom') { $auth_class = 'Custom_Auth'; } if (!$auth_class) { <<<<<<<<<<< with "dynamic" EXIT HERE Hm_Functions::cease('Invalid auth configuration'); } else { return $auth_class; } ``` dynamic auth cannot be used
kerem 2026-02-25 21:34:20 +03:00
Author
Owner

@jasonmunro commented on GitHub (Jun 14, 2017):

Oops, my bad. I will dig into this and get it fixed up ASAP. Thanks for the report

<!-- gh-comment-id:308443802 --> @jasonmunro commented on GitHub (Jun 14, 2017): Oops, my bad. I will dig into this and get it fixed up ASAP. Thanks for the report
Author
Owner

@jasonmunro commented on GitHub (Jun 15, 2017):

This should be fixed now. Sorry about that! I refactored setup_session and setup_auth into a class, and cleanup up the code while I was at it.

<!-- gh-comment-id:308828543 --> @jasonmunro commented on GitHub (Jun 15, 2017): This should be fixed now. Sorry about that! I refactored setup_session and setup_auth into a class, and cleanup up the code while I was at it.
Author
Owner

@jasonmunro commented on GitHub (Jun 16, 2017):

I believe this is fixed so I'm going to close this issue, if you still have problems feel free to re-open or create a new one. Thanks!

<!-- gh-comment-id:309140288 --> @jasonmunro commented on GitHub (Jun 16, 2017): I believe this is fixed so I'm going to close this issue, if you still have problems feel free to re-open or create a new one. Thanks!
Author
Owner

@hartois commented on GitHub (Jun 17, 2017):

Thanks

<!-- gh-comment-id:309213468 --> @hartois commented on GitHub (Jun 17, 2017): Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#166
No description provided.