mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
And also rename "req_acl_rule" "http_req_rule". At the beginning that was a bit confusing to me, especially the "req_acl" list which in fact holds what we call rules. After some digging, it appeared that some part of the code is 100% HTTP and not just related to authentication anymore, so let's move that part to HTTP and keep the auth-only code in auth.c.
52 lines
1 KiB
C
52 lines
1 KiB
C
/*
|
|
* User authentication & authorization.
|
|
*
|
|
* Copyright 2010 Krzysztof Piotr Oledzki <ole@ans.pl>
|
|
*
|
|
* 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
|
|
* 2 of the License, or (at your option) any later version.
|
|
*
|
|
*/
|
|
|
|
#ifndef _TYPES_AUTH_H
|
|
#define _TYPES_AUTH_H
|
|
|
|
#include <common/config.h>
|
|
#include <common/mini-clist.h>
|
|
|
|
#include <types/auth.h>
|
|
|
|
#define MAX_AUTH_GROUPS (unsigned int)(sizeof(int)*8)
|
|
|
|
#define AU_O_INSECURE 0x00000001 /* insecure, unencrypted password */
|
|
|
|
struct auth_users {
|
|
struct auth_users *next;
|
|
unsigned int flags;
|
|
char *user, *pass;
|
|
union {
|
|
char *groups;
|
|
unsigned int group_mask;
|
|
} u;
|
|
};
|
|
|
|
struct userlist {
|
|
struct userlist *next;
|
|
char *name;
|
|
struct auth_users *users;
|
|
int grpcnt;
|
|
char *groups[MAX_AUTH_GROUPS];
|
|
char **groupusers;
|
|
};
|
|
|
|
#endif /* _TYPES_AUTH_H */
|
|
|
|
/*
|
|
* Local variables:
|
|
* c-indent-level: 8
|
|
* c-basic-offset: 8
|
|
* End:
|
|
*/
|
|
|