package cz.moneta.test.dsl.cagw.auth;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.dsl.cagw.auth.oauth.OauthBuilder;
import cz.moneta.test.harness.endpoints.cagw.CaGwEndpoint;
import cz.moneta.test.harness.support.rest.Builders;
import cz.moneta.test.harness.support.rest.RestRequest;

public class AuthBuilder {
    private final Harness harness;

    public AuthBuilder(Harness harness) {
        this.harness = harness;
    }

    public OauthBuilder oauth() {
        return new OauthBuilder(harness);
    }

    private <RESP, B extends RestRequest<B, ?, RESP>> B getBuilder(Class<B> builderClass) {
        return Builders.newRestBuilder(builderClass, CaGwEndpoint.class, harness);
    }
}