package cz.moneta.test.dsl.oauth2.web;

import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.endpoints.oauth2.web.Oauth2WebEndpoint;
import cz.moneta.test.harness.support.web.CustomAction;
import cz.moneta.test.harness.support.web.WebFlow;

public interface Oauth2WebTransitionsKyc extends WebFlow<Oauth2WebTransitionsKyc>, StoreAccessor {
    String APPROVE_ACCESS_TO_ACCOUNT_PAGE_GENERAL_URL = "api/v4/auth?response_type=code&scope=KYC&state=%s&client_id=%s";

    @CustomAction
    default ApproveAccessToAccountPageKyc openApproveAccessToAccountPageKyc(String state, String clientId) {
            Oauth2WebEndpoint endpoint = getEndpoint(Oauth2WebEndpoint.class);
            endpoint.changePath(String.format(APPROVE_ACCESS_TO_ACCOUNT_PAGE_GENERAL_URL, state, clientId));
        return null;
    }
}