Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 1 | /* |
| 2 | * User authentication & authorization. |
| 3 | * |
| 4 | * Copyright 2010 Krzysztof Piotr Oledzki <ole@ans.pl> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #ifndef _PROTO_AUTH_H |
| 14 | #define _PROTO_AUTH_H |
| 15 | |
Willy Tarreau | 4c7e4b7 | 2020-05-27 12:58:42 +0200 | [diff] [blame^] | 16 | #include <haproxy/api.h> |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 17 | #include <types/auth.h> |
| 18 | |
| 19 | extern struct userlist *userlist; |
| 20 | |
| 21 | struct userlist *auth_find_userlist(char *name); |
| 22 | unsigned int auth_resolve_groups(struct userlist *l, char *groups); |
Thierry FOURNIER | 9eec0a6 | 2014-01-22 18:38:02 +0100 | [diff] [blame] | 23 | int userlist_postinit(); |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 24 | void userlist_free(struct userlist *ul); |
Thierry FOURNIER | 5338eea | 2013-12-16 14:22:13 +0100 | [diff] [blame] | 25 | 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] | 26 | int check_user(struct userlist *ul, const char *user, const char *pass); |
| 27 | int check_group(struct userlist *ul, char *name); |
Krzysztof Piotr Oledzki | 9610504 | 2010-01-29 17:50:44 +0100 | [diff] [blame] | 28 | |
| 29 | #endif /* _PROTO_AUTH_H */ |
| 30 | |
| 31 | /* |
| 32 | * Local variables: |
| 33 | * c-indent-level: 8 |
| 34 | * c-basic-offset: 8 |
| 35 | * End: |
| 36 | */ |
| 37 | |