exp:expuserchecklogin
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Check whether a password read from standard input signs an account in (right password, enabled, not locked), for scripts and health checks; never counts as a failed sign-in
Usage
./console exp:expuserchecklogin [options] php bin/php/expuserchecklogin.php [options] ./console exp:user:check-login [options]
Aliases
exp:user:check-login
Help
The output of ./console help exp:expuserchecklogin (the script run with --help), without the standard options:
Usage: bin/php/expuserchecklogin.php [OPTION]... [USER] Check a sign-in Reads a password from standard input (--password-stdin, never from the command line) and says whether it signs the account in: the right password, the account enabled and not locked. Exit 0 when it does, 1 when not, with the reason (wrong_password, disabled, locked, no_object). The check does not sign in, opens no session, never counts as a failed sign-in and never prints the password. Made for scripts and health checks of service accounts; a second sign-in step is not checked. ./console exp:user:check-login ci-bot --password-stdin < /root/secrets/ci-bot-password printf '%s\n' "$PASSWORD" | ./console exp:user:check-login ci-bot --password-stdin --format=json Options: --password-stdin Read the password from standard input (one line), never from the command line (create and reset-password: it must pass the password rules) --format=VALUE text (default) or json (the machine output exp-user/1)
Options
| Option | Value | Description |
|---|---|---|
| --password-stdin | - | Read the password from standard input (one line), never from the command line (create and reset-password: it must pass the password rules) |
| --format | required | text (default) or json (the machine output exp-user/1) |
Arguments
[user]
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/expuserchecklogin.php, kernel/private/classes/commands/expuserchecklogin.php
See also
Generated example: exp:expuserchecklogin
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment