1 | #ifndef MYSQL_PLUGIN_PASSWORD_VALIDATION_INCLUDED |
2 | /* Copyright (C) 2014 Sergei Golubchik and MariaDB |
3 | |
4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; version 2 of the License. |
7 | |
8 | This program is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | GNU General Public License for more details. |
12 | |
13 | You should have received a copy of the GNU General Public License |
14 | along with this program; if not, write to the Free Software |
15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ |
16 | |
17 | /** |
18 | @file |
19 | |
20 | Password Validation Plugin API. |
21 | |
22 | This file defines the API for server password validation plugins. |
23 | */ |
24 | |
25 | #define MYSQL_PLUGIN_PASSWORD_VALIDATION_INCLUDED |
26 | |
27 | #include <mysql/plugin.h> |
28 | |
29 | #ifdef __cplusplus |
30 | extern "C" { |
31 | #endif |
32 | |
33 | #define MariaDB_PASSWORD_VALIDATION_INTERFACE_VERSION 0x0100 |
34 | |
35 | /** |
36 | Password validation plugin descriptor |
37 | */ |
38 | struct st_mariadb_password_validation |
39 | { |
40 | int interface_version; /**< version plugin uses */ |
41 | /** |
42 | Function provided by the plugin which should perform password validation |
43 | and return 0 if the password has passed the validation. |
44 | */ |
45 | int (*validate_password)(MYSQL_CONST_LEX_STRING *username, |
46 | MYSQL_CONST_LEX_STRING *password); |
47 | }; |
48 | |
49 | #ifdef __cplusplus |
50 | } |
51 | #endif |
52 | |
53 | #endif |
54 | |
55 | |