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

import cz.moneta.test.dsl.oauth2.web.pages.FederatedLoginPage;
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 Oauth2WebFederatedLogin extends WebFlow<Oauth2WebFederatedLogin>, StoreAccessor {
    String FEDERATED_LOGIN_PAGE_URL = "#/login/?client_name=Test&state=1234&scope=ALL&return_url=https.seznam.cz";

    @CustomAction
    default FederatedLoginPage callFederatedLogin() {
        Oauth2WebEndpoint endpoint = getEndpoint(Oauth2WebEndpoint.class);
        endpoint.changePath(FEDERATED_LOGIN_PAGE_URL);
        return null;
    }
}