blob: 2fe2b351567ebc6857084d24013689c45e273066 [file] [log] [blame]
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +01001/*
Willy Tarreauac13aea2020-06-04 10:36:03 +02002 * include/haproxy/auth.h
3 * Functions for user authentication & authorization.
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +01004 *
5 * Copyright 2010 Krzysztof Piotr Oledzki <ole@ans.pl>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 *
12 */
13
Willy Tarreauac13aea2020-06-04 10:36:03 +020014#ifndef _HAPROXY_AUTH_H
15#define _HAPROXY_AUTH_H
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010016
Willy Tarreau4c7e4b72020-05-27 12:58:42 +020017#include <haproxy/api.h>
Willy Tarreaub2551052020-06-09 09:07:15 +020018#include <haproxy/auth-t.h>
Willy Tarreau225a90a2020-06-04 15:06:28 +020019#include <haproxy/pattern-t.h>
Willy Tarreaue6ce10b2020-06-04 15:33:47 +020020#include <haproxy/sample-t.h>
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010021
22extern struct userlist *userlist;
23
24struct userlist *auth_find_userlist(char *name);
25unsigned int auth_resolve_groups(struct userlist *l, char *groups);
Thierry FOURNIER9eec0a62014-01-22 18:38:02 +010026int userlist_postinit();
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010027void userlist_free(struct userlist *ul);
Thierry FOURNIER5338eea2013-12-16 14:22:13 +010028struct pattern *pat_match_auth(struct sample *smp, struct pattern_expr *expr, int fill);
Thierry FOURNIER9eec0a62014-01-22 18:38:02 +010029int check_user(struct userlist *ul, const char *user, const char *pass);
30int check_group(struct userlist *ul, char *name);
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010031
Willy Tarreauac13aea2020-06-04 10:36:03 +020032#endif /* _HAPROXY_AUTH_H */
Krzysztof Piotr Oledzki96105042010-01-29 17:50:44 +010033
34/*
35 * Local variables:
36 * c-indent-level: 8
37 * c-basic-offset: 8
38 * End:
39 */
40