source: auth.h @ 8ca172f

Last change on this file since 8ca172f was 8e6ecfe, checked in by Dennis Kaarsemaker <dennis@…>, at 2016-03-25T18:07:53Z

Authentication: scaffolding for multiple authentication backends

Instead of always putting users passwords in XML files, allow site
admins to configure a different authentication method to integrate
authentication with other systems.

This doesn't add any authentication backends yet, merely the
scaffolding. Notably:

  • Password checking and loading/removing from storage has been decoupled. A new auth_check_pass function is used to check passwords. It does check against the configured storage first, but will handle the authentication backends as well. The XML storage merely signals that a user's password should be checked using an authentication backend.
  • If unknown-to-bitlbee users identify using an authentication backend, they are automatically registered.
  • If an authentication backend is used, that fact is stored in the XML file, the password is not. Passwords are also stored unencrypted in this case, as the password used to encrypt them can change underneath us.
  • configure and Makefile changes for the backend objects
  • Property mode set to 100644
File size: 337 bytes
1#ifndef __BITLBEE_AUTH_H__
2#define __BITLBEE_AUTH_H__
4#include "storage.h"
6typedef struct {
7        const char *name;
8        storage_status_t (*check_pass)(const char *nick, const char *password);
9} auth_backend_t;
11GList *auth_init(const char *backend);
12storage_status_t auth_check_pass(irc_t *irc, const char *nick, const char *password);
Note: See TracBrowser for help on using the repository browser.