Skip to content

Commit

Permalink
schema cleanup: removed some earlier analyzed elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed Jun 7, 2023
1 parent 819d69f commit 27cc3ca
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,15 @@
<xsd:appinfo>
<a:container/>
<a:since>4.1</a:since>
<a:schemaMigration>
<a:element>tns:name</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
<a:comment>Use AbstractAuthenticationModuleType/identifier instead</a:comment>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Unique name of the authentication module. This name is fact a short identifier.
It is supposed to give some idea about nature of the module to system administrator.
But it is not supposed to be used as a user-friendly label for the module.
Module name must be unique.
<p>
Deprecated, use identifier instead
</p>
</xsd:documentation>
<xsd:appinfo>
<a:deprecated/>
<a:deprecatedSince>4.7</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="identifier" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -1638,26 +1627,15 @@
<xsd:appinfo>
<a:container/>
<a:since>4.1</a:since>
<a:schemaMigration>
<a:element>tns:name</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
<a:comment>Use AuthenticationSequenceType/identifier instead</a:comment>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Unique name of the authentication sequence. This name is fact a short identifier.
It is supposed to give some idea about purpose of the sequence to system administrator.
But it is not supposed to be used as a user-friendly label.
Sequence name must be unique.
<p>
Deprecated, use identifier instead
</p>
</xsd:documentation>
<xsd:appinfo>
<a:deprecated/>
<a:deprecatedSince>4.7</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="identifier" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -1853,25 +1831,15 @@
<xsd:appinfo>
<a:container/>
<a:since>4.1</a:since>
<a:schemaMigration>
<a:element>tns:name</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
<a:comment>Use AuthenticationSequenceModuleType/identifier instead</a:comment>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Reference to the authentication module name. Value of this element must match name of
existing authentication module.
<p>
Deprecated, use identifier instead.
</p>
</xsd:documentation>
<xsd:appinfo>
<a:deprecated/>
<a:deprecatedSince>4.7</a:deprecatedSince>
<a:plannedRemoval>4.8</a:plannedRemoval>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="identifier" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Expand Down Expand Up @@ -2105,24 +2073,15 @@
<a:operation>removed</a:operation>
<a:comment>Use flexible authentication sequence instead.</a:comment>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:name</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
<a:comment>Use CredentialsResetPolicyType/identifier instead</a:comment>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="name" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:documentation>
Name of the password reset scheme. This is a short name that acts both as an
identifier of the scheme and also as a short name used for diagnostics.

DEPRECATED: use identifier attribute instead of name
</xsd:documentation>
<xsd:appinfo>
<a:since>3.7.1</a:since>
<a:deprecated/>
<a:deprecatedSince>4.7</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="identifier" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1728,11 +1728,17 @@ private String getNonceCredentialsPolicyName(UserType user, Task task, Operation
}

private boolean sequenceIdentifierMatch(AuthenticationSequenceType seq, String sequenceIdentifier) {
return sequenceIdentifier.equals(seq.getName()) || sequenceIdentifier.equals(seq.getIdentifier());
if (sequenceIdentifier == null) {
return false;
}
return sequenceIdentifier.equals(seq.getIdentifier());
}

private boolean moduleIdentifierMatch(MailNonceAuthenticationModuleType module, String moduleIdentifier) {
String mailNonceModuleId = module.getIdentifier() != null ? module.getIdentifier() : module.getName();
if (moduleIdentifier == null) {
return false;
}
String mailNonceModuleId = module.getIdentifier();
return moduleIdentifier.equals(mailNonceModuleId);
}

Expand Down

0 comments on commit 27cc3ca

Please sign in to comment.