final class Identification
    implements Node
    uses Snapshot
Public API: explicitly declared with @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.

Holding a plugin and its authentication stringdoctest
$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 $plugin
public Credential $credential
public Text|null $secret = null

Methods§

public function __construct(
    public Name|null $plugin,
    public Credential $credential,
    public Text|null $secret = null,
)

Parameters

$pluginName|nullThe authentication plugin, when WITH names one
$credentialCredentialWhat the clause gives the plugin
$secretText|nullThe password, hash or authentication string, for a credential that carries one
Calls 5
public function replaceable(): bool

Tells whether REPLACE 'current' may follow the method: a new password, generated or written.

Returns

bool
Test cases 1
Calls 2
public function retainable(): bool

Tells whether RETAIN CURRENT PASSWORD may follow the method: one that gives the plugin a new secret.

Returns

bool
Test cases 1
Calls 2
public function initial(): bool

Tells whether the method can be the INITIAL AUTHENTICATION of a passwordless account.

Returns

bool
Test cases 1
Calls 2
public function render(Output $out): void

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
Constant reads 1
Type declarations 5