Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 1 | /* |
Willy Tarreau | ac13aea | 2020-06-04 10:36:03 +0200 | [diff] [blame] | 2 | * include/haproxy/auth.h |
| 3 | * Functions for user authentication & authorization. |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 4 | * |
| 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 Tarreau | ac13aea | 2020-06-04 10:36:03 +0200 | [diff] [blame] | 14 | #ifndef _HAPROXY_AUTH_H |
| 15 | #define _HAPROXY_AUTH_H |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 16 | |
Willy Tarreau | 4c7e4b7 | 2020-05-27 12:58:42 +0200 | [diff] [blame] | 17 | #include <haproxy/api.h> |
Willy Tarreau | b255105 | 2020-06-09 09:07:15 +0200 | [diff] [blame] | 18 | #include <haproxy/auth-t.h> |
Willy Tarreau | 225a90a | 2020-06-04 15:06:28 +0200 | [diff] [blame] | 19 | #include <haproxy/pattern-t.h> |
Willy Tarreau | e6ce10b | 2020-06-04 15:33:47 +0200 | [diff] [blame] | 20 | #include <haproxy/sample-t.h> |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 21 | |
| 22 | extern struct userlist *userlist; |
| 23 | |
| 24 | struct userlist *auth_find_userlist(char *name); |
| 25 | unsigned int auth_resolve_groups(struct userlist *l, char *groups); |
Thierry FOURNIER | 9eec0a6 | 2014-01-22 18:38:02 +0100 | [diff] [blame] | 26 | int userlist_postinit(); |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 27 | void userlist_free(struct userlist *ul); |
Thierry FOURNIER | 5338eea | 2013-12-16 14:22:13 +0100 | [diff] [blame] | 28 | struct pattern *pat_match_auth(struct sample *smp, struct pattern_expr *expr, int fill); |
Thierry FOURNIER | 9eec0a6 | 2014-01-22 18:38:02 +0100 | [diff] [blame] | 29 | int check_user(struct userlist *ul, const char *user, const char *pass); |
| 30 | int check_group(struct userlist *ul, char *name); |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 31 | |
Willy Tarreau | ac13aea | 2020-06-04 10:36:03 +0200 | [diff] [blame] | 32 | #endif /* _HAPROXY_AUTH_H */ |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 33 | |
| 34 | /* |
| 35 | * Local variables: |
| 36 | * c-indent-level: 8 |
| 37 | * c-basic-offset: 8 |
| 38 | * End: |
| 39 | */ |
| 40 | |