def token_details_has_expired(self):
    token_details = self.__token_details
    if (token_details is None):
        return True
    expires = token_details.expires
    if (expires is None):
        return False
    timestamp = self._timestamp()
    if self.__time_offset:
        timestamp += self.__time_offset
    return (expires < (timestamp + token_details.TOKEN_EXPIRY_BUFFER))
def token_details_has_expired(self):
    token_details = self.__token_details
    if (token_details is None):
        return True
    expires = token_details.expires
    if (expires is None):
        return False
    timestamp = self._timestamp()
    if self.__time_offset:
        timestamp += self.__time_offset
    return (expires < (timestamp + token_details.TOKEN_EXPIRY_BUFFER))