package ru.yandex.wmconsole.authorization;

import ru.yandex.common.framework.core.ServRequest;
import ru.yandex.common.framework.core.ServResponse;
import ru.yandex.wmconsole.error.ClientException;
import ru.yandex.wmconsole.error.ClientProblem;
import ru.yandex.wmtools.common.authorization.AuthorizationScheme;
import ru.yandex.wmtools.common.error.InternalException;
import ru.yandex.wmtools.common.error.UserException;

/**
 * @author aherman
 */
public class AlwaysFailAuthorizationScheme implements AuthorizationScheme {
    @Override
    public long getUserId(ServRequest req, ServResponse res) throws UserException, InternalException {
        throw new ClientException(ClientProblem.INTERNAL_ERROR, "Authorization failed");
    }
}
