Prevent users from logging in while BMC is not yet ready.

Reject user logins while BMC_READY state has not been reached yet,
and report the reason in response.

Resolves: openbmc/openbmc#2974

This behavior may be enabled by appending `--with-bmc-check` to
command line arguments.

When it is enabled it maybe temporary disabled by sending `force`
flag with the login request:
```
{
    "data": [ "username", "password" ],
    "force": true
}
```

Tested: When trying to login in REST receiving response with code 503
while BMC is booting.
Change-Id: I04fce09de2b7a3074b5253346a87773641fd57d0
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
1 file changed
tree: 36cd5f49af00111fddcbd0e27c48f9bc1d56d8fc
  1. module/
  2. servers/
  3. LICENSE
  4. MAINTAINERS