@maschinenlesbar.org/regionalstatistik-cli
    Preparing search index...

    Function loginVerdict

    • Evaluate a parsed helloworld/logincheck answer (P18). GENESIS answers a login check with HTTP 200 whether or not the credentials are right; the outcome is in the body:

      • Status as a string (the live shape): an error text means rejected, a success text accepted;
      • Status as an object, or a flat { Code, Content, Type } (the shape of every other GENESIS answer and of the auth errors): an error Type, or a Code other than 0/22, means rejected;
      • Username, the account the server logged in: it must be a non-empty string. Live, a wrong token comes back echoed as the Username; when the Status is neither a success nor an error text, a Username that equals the token sent (token, when the login was by token) counts as rejected too.

      Anything else — no Status, an unrecognised text without that echo, no Username — is malformed: the check confirmed nothing.

      Parameters

      • parsed: unknown
      • Optionaltoken: string

      Returns LoginVerdict