def _authorisation(auth):
    """Check username/password for basic authentication"""
    if not auth:
        return False

    user = auth.username
    password = auth.password

    credentials = {'Alice': 'secret',
                   'Bob': 'supersecret'}

    try:
        truepass = credentials[user]
    except KeyError:
        return False

    if truepass == password:
        return True
    else:
        return False