package ru.yandex.wmconsole.servantlet.api;

import ru.yandex.common.framework.core.ServRequest;
import ru.yandex.common.framework.core.ServResponse;
import ru.yandex.wmconsole.authorization.ApiOAuthPermission;
import ru.yandex.wmtools.common.data.wrappers.LongWrapper;

/**
 * @author ailyin
 */
public class ApiGetUidServantlet extends AbstractApiServantlet {
    @Override
    public void apiDoProcess(ServRequest req, ServResponse res, long userId) {
        res.addData(new LongWrapper("uid", userId));
    }

    @Override
    public ApiOAuthPermission getRequiredPermission() {
        return ApiOAuthPermission.VALIDATE_TOKEN_ONLY;
    }
}
