use of com.evolveum.midpoint.xml.ns._public.common.common_3.SelfRegistrationPolicyType in project midpoint by Evolveum.
the class SelfRegistrationDto method initSelfRegistrationDto.
public void initSelfRegistrationDto(SecurityPolicyType securityPolicy) throws SchemaException {
if (securityPolicy == null) {
return;
}
SelfRegistrationPolicyType selfRegistration = getSelfRegistrationPolicy(securityPolicy);
if (selfRegistration == null) {
return;
}
this.name = selfRegistration.getName();
this.defaultRoles = selfRegistration.getDefaultRole();
this.initialLifecycleState = selfRegistration.getInitialLifecycleState();
this.requiredLifecycleState = selfRegistration.getRequiredLifecycleState();
this.formRef = selfRegistration.getFormRef();
AbstractAuthenticationPolicyType authPolicy = SecurityPolicyUtil.getAuthenticationPolicy(selfRegistration.getAdditionalAuthenticationName(), securityPolicy);
if (authPolicy instanceof MailAuthenticationPolicyType) {
this.mailAuthenticationPolicy = (MailAuthenticationPolicyType) authPolicy;
noncePolicy = SecurityPolicyUtil.getCredentialPolicy(((MailAuthenticationPolicyType) authPolicy).getMailNonce(), securityPolicy);
} else if (authPolicy instanceof SmsAuthenticationPolicyType) {
this.smsAuthenticationPolicy = (SmsAuthenticationPolicyType) authPolicy;
noncePolicy = SecurityPolicyUtil.getCredentialPolicy(((SmsAuthenticationPolicyType) authPolicy).getSmsNonce(), securityPolicy);
}
}
Aggregations