![]() |
MySQL 9.5.0
Source Code Documentation
|
#include <my_dir.h>#include <my_sys.h>#include <mysql/client_plugin.h>#include <mysql/service_mysql_alloc.h>#include <fstream>#include <iostream>#include "mysql_com.h"Macros | |
| #define | MAX_MESSAGE_SIZE 20000 |
Functions | |
| void | log_error (const std::string &message) |
| Log error message to client. More... | |
| void | free_plugin_option (char *&option) |
| Free plugin option. More... | |
| bool | get_part (std::string &jwt, std::string &part) |
| Extract a part from JWT. More... | |
| bool | get_jwt_parts (std::string jwt, std::string &head, std::string &body, std::string &sig) |
| Extract head, body and signature from JWT. More... | |
| static int | openid_connect_authentication_client_plugin (MYSQL_PLUGIN_VIO *vio, MYSQL *) |
| client auth function More... | |
| static int | initialize_plugin (char *, size_t, int, va_list) |
| static int | authentication_openid_connect_client_option (const char *option, const void *val) |
| authentication_openid_connect_client_option plugin API to allow server to pass optional data for plugin to process More... | |
| mysql_declare_client_plugin (AUTHENTICATION) "authentication_openid_connect_client" | |
Variables | |
| static char * | s_id_token_location = nullptr |
| static const int | s_max_token_size = 10000 |
| static constexpr const char * | base64url_chars |
| MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE | |
| OpenID Connect Client Authentication | Plugin |
| OpenID Connect Client Authentication | COMMUNITY |
| OpenID Connect Client Authentication | nullptr |
| OpenID Connect Client Authentication | initialize_plugin |
| OpenID Connect Client Authentication | deinitialize_plugin |
| OpenID Connect Client Authentication | authentication_openid_connect_client_option |
| OpenID Connect Client Authentication | openid_connect_authentication_client_plugin |
| OpenID Connect Client Authentication nullptr | mysql_end_client_plugin |
| #define MAX_MESSAGE_SIZE 20000 |
|
static |
authentication_openid_connect_client_option plugin API to allow server to pass optional data for plugin to process
|
inline |
Free plugin option.
| [in] | option | Plugin option to be freed |
| bool get_jwt_parts | ( | std::string | jwt, |
| std::string & | head, | ||
| std::string & | body, | ||
| std::string & | sig | ||
| ) |
Extract head, body and signature from JWT.
| [in] | jwt | JSON Web Token |
| [out] | head | Token's head |
| [out] | body | Token's body |
| [out] | sig | Token's signature |
| false | Success |
| true | Failure |
| bool get_part | ( | std::string & | jwt, |
| std::string & | part | ||
| ) |
Extract a part from JWT.
| [in] | jwt | JSON Web Token |
| [out] | part | Part extracted |
| false | Success |
| true | Failure |
|
static |
| void log_error | ( | const std::string & | message | ) |
Log error message to client.
| [in] | message | Message to be displayed |
| mysql_declare_client_plugin | ( | AUTHENTICATION | ) |
|
static |
client auth function
read stuff via the VIO. try to read first get (login) data from the MYSQL handle: mysql->user, mysql->passwd return CR_OK on success, CR_ERROR on failure
Step 1: Read the id token.
Step 2: Check if connection is secure.
Step 3: Send the id token to the server for verification.
| OpenID Connect Client Authentication authentication_openid_connect_client_option |
|
staticconstexpr |
| OpenID Connect Client Authentication COMMUNITY |
| OpenID Connect Client Authentication deinitialize_plugin |
| OpenID Connect Client Authentication initialize_plugin |
| MYSQL_CLIENT_PLUGIN_AUTHOR_ORACLE |
| OpenID Connect Client Authentication nullptr |
| OpenID Connect Client Authentication openid_connect_authentication_client_plugin |
| OpenID Connect Client Authentication Plugin |
|
static |
|
static |