'Checks if the request passed the pin test.  This returns `True` if the
request is trusted on a pin/cookie basis and returns `False` if not.
Additionally if the cookie\'s stored pin hash is wrong it will return
`None` so that appropriate action can be taken.'

def check_pin_trust(self, environ):

    if (self.pin is None):
        return True
    val = parse_cookie(environ).get(self.pin_cookie_name)
    if ((not val) or ('|' not in val)):
        return False
    (ts, pin_hash) = val.split('|', 1)
    if (not ts.isdigit()):
        return False
    if (pin_hash != hash_pin(self.pin)):
        return None
    return ((time.time() - PIN_TIME) < int(ts))
