Search in sources :

Example 1 with PerryV2DevModeTokenProvider

use of gov.ca.cwds.test.support.PerryV2DevModeTokenProvider in project cals-api by ca-cwds.

the class RestClientTestRule method prepareForTesting.

private void prepareForTesting() {
    if (TestModeUtils.isIntegrationTestsMode()) {
        try {
            String principal = fixture("security/default-login-principal.json");
            defaultAuthParams = new JsonIdentityAuthParams(principal);
            tokenProvider = new PerryV2DevModeTokenProvider(client, TestModeUtils.perryUrl(), TestModeUtils.loginFormTargetUrl());
        } catch (Exception e) {
            LOG.warn("Cannot generate token");
            LOG.error(e.getMessage(), e);
        }
    }
}
Also used : PerryV2DevModeTokenProvider(gov.ca.cwds.test.support.PerryV2DevModeTokenProvider) JsonIdentityAuthParams(gov.ca.cwds.test.support.JsonIdentityAuthParams)

Aggregations

JsonIdentityAuthParams (gov.ca.cwds.test.support.JsonIdentityAuthParams)1 PerryV2DevModeTokenProvider (gov.ca.cwds.test.support.PerryV2DevModeTokenProvider)1