@classmethod
def dump_access_token(cls, key: str, identity: Identity, exp: int) -> str:
    current_ts = int(time.time())
    return jwt.encode(payload=dict(user=identity.user, role=identity.role, nbf=(current_ts - 300), exp=(current_ts + exp)), key=key, algorithm=cls.ACCESS_JWT_ALGORITHM)
@classmethod
def dump_access_token(cls, key: str, identity: Identity, exp: int) -> str:
    current_ts = int(time.time())
    return jwt.encode(payload=dict(user=identity.user, role=identity.role, nbf=(current_ts - 300), exp=(current_ts + exp)), key=key, algorithm=cls.ACCESS_JWT_ALGORITHM)