Skip to content

Commit

Permalink
adding deprecated tag for elements resertMail, resetSms and resretSec…
Browse files Browse the repository at this point in the history
…Question
  • Loading branch information
skublik committed Nov 30, 2021
1 parent e64129d commit 3a2d68b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,10 @@ public void initResetPolicyDto(SecurityPolicyType securityPolicyType) throws Sch
return;
}

// if (securityPolicyType.getCredentials() != null
// && securityPolicyType.getCredentials().getSecurityQuestions() != null) {
// this.securityQuestions = securityPolicyType.getCredentials().getSecurityQuestions();
// resetMethod.add(ResetMethod.SECURITY_QUESTIONS);
// return;
// }

if (securityPolicyType.getCredentialsReset() == null) {
return;
}



MailResetPolicyType mailResetPolicy = securityPolicyType.getCredentialsReset().getMailReset();
if (mailResetPolicy != null) {
this.resetMethod = ResetMethod.MAIL;
Expand All @@ -82,7 +73,10 @@ public void initResetPolicyDto(SecurityPolicyType securityPolicyType) throws Sch

private void initResetPolicy(AbstractCredentialsResetPolicyType resetPolicy,
SecurityPolicyType securityPolicyType) throws SchemaException {
this.formRef = resetPolicy.getFormRef();
this.formRef = securityPolicyType.getCredentialsReset().getFormRef();
if (this.formRef == null) {
this.formRef = resetPolicy.getFormRef();
}
AbstractAuthenticationPolicyType authPolicy = SecurityPolicyUtil
.getAuthenticationPolicy(resetPolicy.getAdditionalAuthenticationName(), securityPolicyType);
if (authPolicy instanceof MailAuthenticationPolicyType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ private void initPostAuthenticationConfiguration() {
}

private void initResetCredentialsConfiguration() {

// TODO: cleanup, the same as in the PageRegistrationBase
SecurityPolicyType securityPolicy = resolveSecurityPolicy();

this.resetPasswordPolicy = new ResetPolicyDto();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.1</a:deprecatedSince>
<a:plannedRemoval>4.5</a:plannedRemoval>
<a:plannedRemoval>4.6</a:plannedRemoval>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Expand All @@ -122,7 +122,7 @@
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.1</a:deprecatedSince>
<a:plannedRemoval>4.5</a:plannedRemoval>
<a:plannedRemoval>4.6</a:plannedRemoval>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Expand Down Expand Up @@ -1573,13 +1573,41 @@
</xsd:element>
<!-- Later: delivery -->
<xsd:element name="securityQuestionReset" type="tns:SecurityQuestionsResetPolicyType" minOccurs="0">
<!-- This will be deprecated soon -->
<xsd:annotation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.5</a:deprecatedSince>
<a:plannedRemoval>4.6</a:plannedRemoval>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="mailReset" type="tns:MailResetPolicyType" minOccurs="0">
<!-- This will be deprecated soon -->
<xsd:annotation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.5</a:deprecatedSince>
<a:plannedRemoval>4.6</a:plannedRemoval>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="smsReset" type="tns:SmsResetPolicyType" minOccurs="0">
<!-- This will be deprecated soon -->
<xsd:annotation>
<xsd:appinfo>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.5</a:deprecatedSince>
<a:plannedRemoval>4.6</a:plannedRemoval>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="formRef" type="c:ObjectReferenceType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
Reference to form which is displayed for registration
</xsd:documentation>
<xsd:appinfo>
<a:objectReferenceTargetType>tns:FormType</a:objectReferenceTargetType>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
Expand Down

0 comments on commit 3a2d68b

Please sign in to comment.