mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Modularise HTTP authentication
This commit is contained in:
parent
4bb87288f8
commit
337958d4e4
@ -286,7 +286,6 @@ terminate_all_subsystems(void)
|
|||||||
free_marks();
|
free_marks();
|
||||||
#endif
|
#endif
|
||||||
free_history_lists();
|
free_history_lists();
|
||||||
free_auth();
|
|
||||||
done_modules(builtin_modules);
|
done_modules(builtin_modules);
|
||||||
done_screen_drivers();
|
done_screen_drivers();
|
||||||
done_saved_session_info();
|
done_saved_session_info();
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "bfu/hierbox.h"
|
#include "bfu/hierbox.h"
|
||||||
#include "intl/gettext/libintl.h"
|
#include "intl/gettext/libintl.h"
|
||||||
|
#include "main/module.h"
|
||||||
#include "protocol/auth/auth.h"
|
#include "protocol/auth/auth.h"
|
||||||
#include "protocol/auth/dialogs.h"
|
#include "protocol/auth/dialogs.h"
|
||||||
#include "protocol/protocol.h"
|
#include "protocol/protocol.h"
|
||||||
@ -305,6 +306,12 @@ free_auth(void)
|
|||||||
free_list(questions_queue);
|
free_list(questions_queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
done_auth(struct module *xxx)
|
||||||
|
{
|
||||||
|
free_auth();
|
||||||
|
}
|
||||||
|
|
||||||
struct auth_entry *
|
struct auth_entry *
|
||||||
get_invalid_auth_entry(void)
|
get_invalid_auth_entry(void)
|
||||||
{
|
{
|
||||||
@ -320,3 +327,13 @@ get_invalid_auth_entry(void)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct module auth_module = struct_module(
|
||||||
|
/* name: */ "HTTP Authentication",
|
||||||
|
/* options: */ NULL,
|
||||||
|
/* hooks: */ NULL,
|
||||||
|
/* submodules: */ NULL,
|
||||||
|
/* data: */ NULL,
|
||||||
|
/* init: */ NULL,
|
||||||
|
/* done: */ done_auth
|
||||||
|
);
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "util/lists.h"
|
#include "util/lists.h"
|
||||||
|
|
||||||
struct listbox_item;
|
struct listbox_item;
|
||||||
|
struct module;
|
||||||
|
|
||||||
struct auth_entry {
|
struct auth_entry {
|
||||||
OBJECT_HEAD(struct auth_entry);
|
OBJECT_HEAD(struct auth_entry);
|
||||||
@ -41,4 +42,6 @@ void del_auth_entry(struct auth_entry *);
|
|||||||
void free_auth(void);
|
void free_auth(void);
|
||||||
struct auth_entry *get_invalid_auth_entry(void);
|
struct auth_entry *get_invalid_auth_entry(void);
|
||||||
|
|
||||||
|
extern struct module auth_module;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
/* Backends dynamic area: */
|
/* Backends dynamic area: */
|
||||||
|
|
||||||
#include "protocol/about.h"
|
#include "protocol/about.h"
|
||||||
|
#include "protocol/auth/auth.h"
|
||||||
#include "protocol/bittorrent/bittorrent.h"
|
#include "protocol/bittorrent/bittorrent.h"
|
||||||
#include "protocol/bittorrent/connection.h"
|
#include "protocol/bittorrent/connection.h"
|
||||||
#include "protocol/data.h"
|
#include "protocol/data.h"
|
||||||
@ -273,6 +274,7 @@ static struct option_info protocol_options[] = {
|
|||||||
NULL_OPTION_INFO,
|
NULL_OPTION_INFO,
|
||||||
};
|
};
|
||||||
static struct module *protocol_submodules[] = {
|
static struct module *protocol_submodules[] = {
|
||||||
|
&auth_module,
|
||||||
#ifdef CONFIG_BITTORRENT
|
#ifdef CONFIG_BITTORRENT
|
||||||
&bittorrent_protocol_module,
|
&bittorrent_protocol_module,
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user