MySQL 9.1.0
Source Code Documentation
authentication_policy::Factor Class Reference

Class representing authenticalion policy factor. More...

#include <authentication_policy.h>

Public Member Functions

 Factor (const std::string &mandatory_plugin, const std::string &default_plugin)
 Constructor. More...
 
bool is_optional () const
 Is the factor optional (may be omitted)? More...
 
bool is_whichever () const
 Is the factor whichever (any auth plugin may be used for it)? More...
 
bool is_mandatory_specified () const
 Has the factor a concrete mandatory auth plugin specified? More...
 
bool is_default_specified () const
 Has the factor a default plugin specified? More...
 
const std::string & get_mandatory_plugin () const
 Get mandatory plugin name. More...
 
const std::string & get_default_plugin () const
 Get default plugin name. More...
 
const std::string & get_mandatory_or_default_plugin () const
 Get mandatory plugin name (if defined) else the default plugin name. More...
 

Protected Member Functions

void set_default ()
 Set default to system defined. More...
 

Private Attributes

std::string mandatory_plugin
 If empty: the factor is optional If "*" : the factor may be whichever plugin Else : mandatory plugin name. More...
 
std::string default_plugin
 Default plugin name. More...
 

Friends

class Policy
 

Detailed Description

Class representing authenticalion policy factor.

Constructor & Destructor Documentation

◆ Factor()

authentication_policy::Factor::Factor ( const std::string &  mandatory_plugin,
const std::string &  default_plugin 
)

Constructor.

Parameters
[in]mandatory_pluginmandatory plugin name
[in]default_plugindefault plugin name

Member Function Documentation

◆ get_default_plugin()

const std::string & authentication_policy::Factor::get_default_plugin ( ) const
inline

Get default plugin name.

Returns
reference to the plugin name.

◆ get_mandatory_or_default_plugin()

const std::string & authentication_policy::Factor::get_mandatory_or_default_plugin ( ) const
inline

Get mandatory plugin name (if defined) else the default plugin name.

This is used e.g. while creating user when the statement doesn't provide plugin name for nth factor.

Returns
reference to the plugin name.

◆ get_mandatory_plugin()

const std::string & authentication_policy::Factor::get_mandatory_plugin ( ) const
inline

Get mandatory plugin name.

Returns
reference to the plugin name.

◆ is_default_specified()

bool authentication_policy::Factor::is_default_specified ( ) const
inline

Has the factor a default plugin specified?

Return values
truethe factor has a default plugin
falsethe factor doesn't have a default plugin

◆ is_mandatory_specified()

bool authentication_policy::Factor::is_mandatory_specified ( ) const
inline

Has the factor a concrete mandatory auth plugin specified?

Return values
truethe factor has a mandatory plugin
falsethe factor doesn't have a mandatory plugin

◆ is_optional()

bool authentication_policy::Factor::is_optional ( ) const
inline

Is the factor optional (may be omitted)?

Return values
truethe factor is optional
falsethe factor is not optional

◆ is_whichever()

bool authentication_policy::Factor::is_whichever ( ) const
inline

Is the factor whichever (any auth plugin may be used for it)?

Return values
truethe factor is whichever
falsethe factor is not whichever

◆ set_default()

void authentication_policy::Factor::set_default ( )
inlineprotected

Set default to system defined.

It is used for 1. factor to avoid undefined default authentication.

Friends And Related Function Documentation

◆ Policy

friend class Policy
friend

Member Data Documentation

◆ default_plugin

std::string authentication_policy::Factor::default_plugin
private

Default plugin name.

◆ mandatory_plugin

std::string authentication_policy::Factor::mandatory_plugin
private

If empty: the factor is optional If "*" : the factor may be whichever plugin Else : mandatory plugin name.


The documentation for this class was generated from the following files: