package cz.moneta.test.dsl.udebs.ib;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.util.task.wso2.digitalchannels.IdmTasks;
import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.udebs.UdebsEndpoint;
import cz.moneta.test.harness.exception.HarnessException;
import cz.moneta.test.harness.support.auth.Credentials;

import java.util.Optional;

@Deprecated
public class UsernameAndPasswordBuilder {

    private final StoreAccessor harness;

    @Deprecated
    public UsernameAndPasswordBuilder(StoreAccessor harness) {
        this.harness = harness;
    }

    /**
     * Method has been replaced by harness.tasks().wso2().idm().getIbCredentialsByRC(rc);
     */
    @Deprecated
    public Credentials getUsernameAndPasswordByRc(String rc) {
        return new IdmTasks((Harness) harness).getIbCredentialsByRC(rc);
    }

    /**
     * Method has been replaced by harness.tasks().wso2().idm().getIbCredentialsByIco(rc);
     */
    @Deprecated
    public Credentials getUsernameAndPasswordByIco(String ico) {
        return new IdmTasks((Harness) harness).getIbCredentialsByIco(ico);
    }
}
