use of com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType in project midpoint by Evolveum.
the class SecurityQuestionAuthneticationEvaluatorImpl method getEffectiveCredentialPolicy.
@Override
protected CredentialPolicyType getEffectiveCredentialPolicy(SecurityPolicyType securityPolicy, SecurityQuestionsAuthenticationContext authnCtx) throws SchemaException {
SecurityQuestionsCredentialsPolicyType policy = authnCtx.getPolicy();
if (policy == null) {
policy = SecurityUtil.getEffectiveSecurityQuestionsCredentialsPolicy(securityPolicy);
}
authnCtx.setPolicy(policy);
return policy;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType in project midpoint by Evolveum.
the class SecurityHelper method postProcessPasswordCredentialPolicy.
private void postProcessPasswordCredentialPolicy(SecurityPolicyType securityPolicyType, PasswordCredentialsPolicyType passwd, Task task, OperationResult result) {
// Deprecated settings
Integer passwordHistoryLength = passwd.getPasswordHistoryLength();
if (passwordHistoryLength != null && passwd.getHistoryLength() == null) {
passwd.setHistoryLength(passwordHistoryLength);
}
ObjectReferenceType passwordPolicyRef = passwd.getPasswordPolicyRef();
if (passwordPolicyRef != null && passwd.getValuePolicyRef() == null) {
passwd.setValuePolicyRef(passwordPolicyRef.clone());
}
ValuePolicyType valuePolicyType = postProcessCredentialPolicy(securityPolicyType, passwd, "password credential policy", task, result);
if (valuePolicyType != null) {
setDeprecatedPasswordPolicyProperties(valuePolicyType, passwd);
}
}
Aggregations