Commit fb11bc5e authored by Jan Koester's avatar Jan Koester
Browse files

Revert "auth: Anmeldung mit Mailadresse, Kontoname als Rueckfall"

This reverts commit 4bf29f62.
Gewollt ist user@<authdb-Domainname> laut Konfiguration; das Problem war
eine falsch eingetragene Domain der Auth-Quelle.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 4bf29f62
Loading
Loading
Loading
Loading
+0 −18
Changes for src/auth.cpp: 0 added lines, 18 removed lines.
Original line number Diff line number Diff line
@@ -230,16 +230,7 @@ void blogi::Auth::login(const int tid,const char* username, const char* password
        throw httpException;
    }

    // authdb knows accounts by their account name (sAMAccountName), not by the
    // mail address: "c.vogel@example.de" fails when the account is "c.vogel".
    // Try the name as typed first, then the part before the '@'.
    try {
    _doLoginWithFailover(srcs, user.c_str(), password, authid, tid, &ssid);
    } catch (...) {
        if(user == userNameOnly || userNameOnly.empty())
            throw;
        _doLoginWithFailover(srcs, userNameOnly.c_str(), password, authid, tid, &ssid);
    }
}

void blogi::Auth::Apilogin(const int tid,const char *username,const char *password,uuid::uuid &authid, const std::string &domain){
@@ -278,16 +269,7 @@ void blogi::Auth::Apilogin(const int tid,const char *username,const char *passwo
        throw httpException;
    }

    // authdb knows accounts by their account name (sAMAccountName), not by the
    // mail address: "c.vogel@example.de" fails when the account is "c.vogel".
    // Try the name as typed first, then the part before the '@'.
    try {
    _doLoginWithFailover(srcs, user.c_str(), password, authid, tid, nullptr);
    } catch (...) {
        if(user == userNameOnly || userNameOnly.empty())
            throw;
        _doLoginWithFailover(srcs, userNameOnly.c_str(), password, authid, tid, nullptr);
    }
}

static constexpr std::chrono::seconds LOGIN_CACHE_TTL{30};