diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2013-03-03 00:46:23 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2013-03-03 00:58:09 +0100 |
| commit | 25e5147c7d3e16ec96713c214dc28e398b3be10c (patch) | |
| tree | b43c9612580f7070608a8848727cc5a358f0a5a8 /auth/eurephia_authplugin_context.h | |
| parent | 262442599d5352f8c48018d975b7f50a53dab33c (diff) | |
| download | eurephia-25e5147c7d3e16ec96713c214dc28e398b3be10c.tar.gz eurephia-25e5147c7d3e16ec96713c214dc28e398b3be10c.tar.xz eurephia-25e5147c7d3e16ec96713c214dc28e398b3be10c.zip | |
Added the first stab of an authentication plug-in framework
This enables a run-time loadable support for other authentication
modules. This can be used to make eurephia authenticate user's
passwords against other sources than the local eurephia database
itself.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'auth/eurephia_authplugin_context.h')
| -rw-r--r-- | auth/eurephia_authplugin_context.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/auth/eurephia_authplugin_context.h b/auth/eurephia_authplugin_context.h new file mode 100644 index 0000000..cc73129 --- /dev/null +++ b/auth/eurephia_authplugin_context.h @@ -0,0 +1,54 @@ +/* eurephia_authplugin_context.h + * + * Copyright (C) 2013 David Sommerseth <dazo@users.sourceforge.net> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/** + * @file eurephia_authplugin_context.h + * @author David Sommerseth <dazo@users.sourceforge.net> + * @date 2013-02-15 + * + * @brief eurephia authentication plug-in context definition + */ + +#ifndef EUREPHIA_AUTHPLUGIN_CONTEXT_H_ +#define EUREPHIA_AUTHPLUGIN_CONTEXT_H_ + +#ifdef EUREPHIA_AUTHPLUGIN_C_ +/** + * Authentication plug-in context. + * Contains an overview of all loaded authentication plug-ins + * + * This struct is only visible for eurephia_authplugin.c, to + * avoid nesting troubles when eurephiaCTX needs declared eAuthPlugin + * which again needs eurephiaCTX to already be defined. + * + */ +typedef struct __eAuthPluginCTX { + char *filename; /**< Filename of the plug-in */ + void *dlhandle; /**< Handle to plug-in returned by dlopen() */ + unsigned int plgid; /**< Name of the plug-in, retrieved from the database */ + eAuthPlugin *plugin; /**< Access to the plug-in funcions */ + + struct __eAuthPluginCTX *next; /**< Pointer to the next auth plug-in */ +} eAuthPluginCTX; +#else +typedef struct __eAuthPluginCTX eAuthPluginCTX; +#endif /* EUREPHIA_AUTHPLUGIN_C_ */ + + +#endif /* EUREPHIA_AUTHPLUGIN_CONTEXT_H_ */ |
