def dump(obj, from_date, with_json=True, latest_only=False, **kwargs):
    """Dump the oauth2server tokens."""
    return dict(id=obj.id,
                client_id=obj.client_id,
                user_id=obj.user_id,
                token_type=obj.token_type,
                access_token=obj.access_token,
                refresh_token=obj.refresh_token,
                expires=dt2iso_or_empty(obj.expires),
                _scopes=obj._scopes,
                is_personal=obj.is_personal,
                is_internal=obj.is_internal)
Dump the oauth2server tokens.