]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Remove OIDC configuration URL hack
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 27 Feb 2024 13:22:21 +0000 (15:22 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:39:58 +0000 (10:39 +0200)
src/auth/auth-request.h
src/auth/db-oauth2.c
src/auth/passdb-oauth2.c
src/auth/passdb.h

index 6893bfce09bacff87af72109d1da9226610a1c32..737dda1a917d4f1031d95c00f06c4522b66fd6ae 100644 (file)
@@ -141,9 +141,6 @@ struct auth_request {
        struct auth_request_handler *handler;
         struct auth_master_connection *master;
 
-       /* FIXME: Remove this once mech-oauth2 correctly does the processing */
-       const char *openid_config_url;
-
        unsigned int connect_uid;
        unsigned int client_pid;
        unsigned int id;
index 02727ed136aa27f1a3c92c0027d93d0f70e4e57a..621f350eae7e46a00293296ff6c94371331940e7 100644 (file)
@@ -273,21 +273,6 @@ static void db_oauth2_free(struct db_oauth2 **_db)
        pool_unref(&db->pool);
 }
 
-static void
-db_oauth2_add_openid_config_url(struct db_oauth2_request *req)
-{
-       /* FIXME: HORRIBLE HACK - REMOVE ME!!!
-          It is because the mech has not been implemented properly
-          that we need to pass the config url in this strange way.
-
-          This **must** be moved to mech-oauth2 once the validation
-          result et al is handled there.
-       */
-       req->auth_request->openid_config_url =
-               p_strdup_empty(req->auth_request->pool,
-                              req->db->set.openid_configuration_url);
-}
-
 const char *db_oauth2_get_openid_configuration_url(const struct db_oauth2 *db)
 {
        return db->set.openid_configuration_url;
@@ -458,9 +443,6 @@ static void db_oauth2_callback(struct db_oauth2_request *req,
 
        i_assert(result == PASSDB_RESULT_OK || error != NULL);
 
-       if (result != PASSDB_RESULT_OK)
-               db_oauth2_add_openid_config_url(req);
-
        /* Successful lookups were logged by the caller. Failed lookups will be
           logged either with e_error() or e_info() by the callback. */
        if (callback != NULL) {
index a5331d8fd605b80aa51201c3172c1a37fa237321..f75b894190ba7fb975fb3dc52e7a8a941665b715 100644 (file)
@@ -65,16 +65,6 @@ static void oauth2_deinit(struct passdb_module *passdb ATTR_UNUSED)
 {
 }
 
-/* FIXME: Remove when oauth2 mech is fixed */
-const char *passdb_oauth2_get_oidc_url(struct passdb_module *passdb)
-{
-       struct oauth2_passdb_module *module =
-               container_of(passdb, struct oauth2_passdb_module, module);
-       if (module->db != NULL)
-               return db_oauth2_get_openid_configuration_url(module->db);
-       return NULL;
-}
-
 struct passdb_module_interface passdb_oauth2 = {
        .name = "oauth2",
 
index baab008ac649a80fa583366c88cfb439aa44cccb..f2eb93a0c8d5511dca5fe23d244393b430d11808 100644 (file)
@@ -115,8 +115,6 @@ void passdbs_generate_md5(unsigned char md5[STATIC_ARRAY MD5_RESULTLEN]);
 void passdbs_init(void);
 void passdbs_deinit(void);
 
-const char *passdb_oauth2_get_oidc_url(struct passdb_module *passdb);
-
 #include "auth-request.h"
 
 #endif