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;
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;
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) {
{
}
-/* 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",
void passdbs_init(void);
void passdbs_deinit(void);
-const char *passdb_oauth2_get_oidc_url(struct passdb_module *passdb);
-
#include "auth-request.h"
#endif