Search in sources :

Example 1 with ResetPolicyDto

use of com.evolveum.midpoint.web.page.forgetpassword.ResetPolicyDto in project midpoint by Evolveum.

the class PageAuthenticationBase method initResetCredentialsConfiguration.

private void initResetCredentialsConfiguration() {
    // TODO: cleanup, the same as in the PageRegistrationBase
    SecurityPolicyType securityPolicy = resolveSecurityPolicy();
    this.resetPasswordPolicy = new ResetPolicyDto();
    try {
        this.resetPasswordPolicy.initResetPolicyDto(securityPolicy);
    } catch (SchemaException e) {
        LOGGER.error("Failed to initialize self registration configuration.", e);
        getSession().error(createStringResource("PageSelfRegistration.selfRegistration.configuration.init.failed").getString());
        throw new RestartResponseException(PageLogin.class);
    }
}
Also used : RestartResponseException(org.apache.wicket.RestartResponseException) ResetPolicyDto(com.evolveum.midpoint.web.page.forgetpassword.ResetPolicyDto) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)

Example 2 with ResetPolicyDto

use of com.evolveum.midpoint.web.page.forgetpassword.ResetPolicyDto in project midpoint by Evolveum.

the class PageRegistrationBase method initResetCredentialsConfiguration.

private void initResetCredentialsConfiguration() {
    SecurityPolicyType securityPolicy = resolveSecurityPolicy();
    this.resetPasswordPolicy = new ResetPolicyDto();
    try {
        this.resetPasswordPolicy.initResetPolicyDto(securityPolicy);
    } catch (SchemaException e) {
        LOGGER.error("Failed to initialize self registration configuration.", e);
        getSession().error(createStringResource("PageSelfRegistration.selfRegistration.configuration.init.failed").getString());
        throw new RestartResponseException(PageLogin.class);
    }
}
Also used : SchemaException(com.evolveum.midpoint.util.exception.SchemaException) RestartResponseException(org.apache.wicket.RestartResponseException) ResetPolicyDto(com.evolveum.midpoint.web.page.forgetpassword.ResetPolicyDto) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)

Aggregations

ResetPolicyDto (com.evolveum.midpoint.web.page.forgetpassword.ResetPolicyDto)2 SecurityPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)2 RestartResponseException (org.apache.wicket.RestartResponseException)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)1