classIdentification
final class Identification
implements Node
uses Snapshot
@visibility public.One authentication method of an account: IDENTIFIED [WITH plugin] [BY 'password' | BY RANDOM PASSWORD | AS 'string'].
Mirrors LEX_MFA. The password or authentication string is an operand with its exact value; it is never dropped or masked. A method without a plugin uses the default authentication plugin of the server. MySQL 5.x also writes IDENTIFIED BY PASSWORD 'hash'. Source: https://dev.mysql.com/doc/refman/8.4/en/create-user.html#create-user-authentication.
$method = new \SqlSemantics\Platform\MySql\Statement\Account\User\Identification(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('caching_sha2_password'), \SqlSemantics\Platform\MySql\Statement\Account\User\Credential::Hash, new \SqlSemantics\Platform\MySql\Statement\Literal\Text('$A$005$x'));
[$method->plugin?->value, $method->secret?->value] // => ['caching_sha2_password', '$A$005$x']Properties§
public Name|null $pluginpublic Credential $credentialpublic Text|null $secret = nullMethods§
public function __construct(
public Name|null $plugin,
public Credential $credential,
public Text|null $secret = null,
)Parameters
$plugin | Name|null | The authentication plugin, when WITH names one |
$credential | Credential | What the clause gives the plugin |
$secret | Text|null | The password, hash or authentication string, for a credential that carries one |
Calls 5
- static-call Check::input() line 40
- method-call Credential::written() line 40
- class-const Credential::None() line 41
- class-const Credential::Hash() line 41
- class-const Credential::PasswordHash() line 42
public function password(): boolTells whether the method sets a password of the default plugin: BY 'password' or BY RANDOM PASSWORD.
Returns
boolTest cases 1
Called from 2
- method-call SqlSemantics\Platform\MySql\Statement\Account\User\Identification::replaceable() packages/sql-semantics-mysql/src/Statement/Account/User/Identification.php:58
- method-call SqlSemantics\Platform\MySql\Statement\Account\User\Identification::initial() packages/sql-semantics-mysql/src/Statement/Account/User/Identification.php:74
Calls 2
- class-const Credential::Password() line 50
- class-const Credential::RandomPassword() line 50
public function replaceable(): boolTells whether REPLACE 'current' may follow the method: a new password, generated or written.
Returns
boolTest cases 1
Calls 2
- class-const Credential::Password() line 58
- method-call Identification::password() line 58
public function retainable(): boolTells whether RETAIN CURRENT PASSWORD may follow the method: one that gives the plugin a new secret.
Returns
boolTest cases 1
Calls 2
- class-const Credential::None() line 66
- class-const Credential::PasswordHash() line 66
public function initial(): boolTells whether the method can be the INITIAL AUTHENTICATION of a passwordless account.
Returns
boolTest cases 1
Calls 2
- method-call Identification::password() line 74
- class-const Credential::Hash() line 74
public function render(Output $out): voidWrites the clause.
Parameters
$out | Output |
Calls 7
- method-call Output::keyword() line 82
- class-const NameUse::Label() line 84
- class-const Credential::None() line 87
- class-const Credential::Password() line 88
- class-const Credential::RandomPassword() line 89
- class-const Credential::Hash() line 90
- class-const Credential::PasswordHash() line 91
Test cases 7§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
Other tests reaching this symbol 3
Relations§
Instantiated in 12
- new SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::identification() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:69
- new SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::identification() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:70
- new SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::identification() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:71
- new SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::identification() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:72
- new SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::identification() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:73
- new SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule::identification() packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:74
- new SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::grant() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:205
- new SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::grant() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:206
- new SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::grant() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:207
- new SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::grant() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:208
- new SqlSemantics\Platform\MySql\Lowering\Account\UserListRule::grant() packages/sql-semantics-mysql/src/Lowering/Account/UserListRule.php:209
- new SqlSemantics\Platform\MySql\Lowering\Account\UserStatementRule::definition() packages/sql-semantics-mysql/src/Lowering/Account/UserStatementRule.php:103
Constant reads 1
Type declarations 5
- type SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:56
- type SqlSemantics\Platform\MySql\Lowering\Account\IdentificationRule packages/sql-semantics-mysql/src/Lowering/Account/IdentificationRule.php:102
- type SqlSemantics\Platform\MySql\Statement\Account\User\FactorStep packages/sql-semantics-mysql/src/Statement/Account/User/FactorStep.php:30
- type SqlSemantics\Platform\MySql\Statement\Account\User\UserSpecification packages/sql-semantics-mysql/src/Statement/Account/User/UserSpecification.php:52
- type SqlSemantics\Platform\MySql\Statement\Account\User\UserSpecification packages/sql-semantics-mysql/src/Statement/Account/User/UserSpecification.php:54