import random


def authenticate_user(username, password):
    """
    Authenticate a user in your database, and return a UserInfo dictionary.
    """
    if username == "nobody":
        return None

    if password != "1234":
        return False

    return {
        # http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
        "sub": username,
        "given_name": random.choice(["Jan", "Robin", "Peter"]),
        "family_name": random.choice(["Donga", "Smith", "van Straten"]),
        "email": username + "@company.tld",
        "preferred_username": username,
    }