Move reauthentication to authenticators
Currently the only situation where a user needs to be authenticated after the initial authentication is when a COM_CHANGE_USER is being executed. This was previously handled by directly calling a function in the MySQLAuth authenticator. The new entry in the API of the authenticators is very specific to MySQL and should be reviewed once other protocols are added.
This commit is contained in:
@ -76,6 +76,12 @@ typedef struct mxs_authenticator
|
||||
void (*free)(struct dcb *);
|
||||
void (*destroy)(void *);
|
||||
int (*loadusers)(struct servlistener *);
|
||||
|
||||
/** This entry point was added to avoid calling authenticator functions
|
||||
* directly when a COM_CHANGE_USER command is executed. */
|
||||
int (*reauthenticate)(struct dcb *, const char *user,
|
||||
uint8_t *token, size_t token_len,
|
||||
uint8_t *scramble, size_t scramble_len);
|
||||
} MXS_AUTHENTICATOR;
|
||||
|
||||
/** Return values for extract and authenticate entry points */
|
||||
|
Reference in New Issue
Block a user