| | |
| | | import org.opends.server.schema.AuthPasswordSyntax; |
| | | import org.opends.server.schema.UserPasswordSyntax; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeBuilder; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | |
| | | private DN identityMapperDN; |
| | | |
| | | // The reference to the identity mapper. |
| | | private IdentityMapper identityMapper; |
| | | private IdentityMapper<?> identityMapper; |
| | | |
| | | // The default set of supported control OIDs for this extended |
| | | private Set<String> supportedControlOIDs = new HashSet<String>(0); |
| | |
| | | if (oldPassword != null) |
| | | { |
| | | // Remove all existing encoded values that match the old password. |
| | | LinkedHashSet<AttributeValue> existingValues = |
| | | pwPolicyState.getPasswordValues(); |
| | | Set<AttributeValue> existingValues = pwPolicyState.getPasswordValues(); |
| | | LinkedHashSet<AttributeValue> deleteValues = |
| | | new LinkedHashSet<AttributeValue>(existingValues.size()); |
| | | if (pwPolicyState.getPolicy().usesAuthPasswordSyntax()) |
| | |
| | | { |
| | | StringBuilder[] components = |
| | | AuthPasswordSyntax.decodeAuthPassword(v.getStringValue()); |
| | | PasswordStorageScheme scheme = |
| | | PasswordStorageScheme<?> scheme = |
| | | DirectoryServer.getAuthPasswordStorageScheme( |
| | | components[0].toString()); |
| | | if (scheme == null) |
| | |
| | | { |
| | | String[] components = |
| | | UserPasswordSyntax.decodeUserPassword(v.getStringValue()); |
| | | PasswordStorageScheme scheme = |
| | | PasswordStorageScheme<?> scheme = |
| | | DirectoryServer.getPasswordStorageScheme( |
| | | toLowerCase(components[0])); |
| | | if (scheme == null) |
| | |
| | | } |
| | | } |
| | | |
| | | Attribute deleteAttr = new Attribute(attrType, attrType.getNameOrOID(), |
| | | deleteValues); |
| | | AttributeBuilder builder = new AttributeBuilder(attrType); |
| | | builder.addAll(deleteValues); |
| | | Attribute deleteAttr = builder.toAttribute(); |
| | | modList.add(new Modification(ModificationType.DELETE, deleteAttr)); |
| | | |
| | | |
| | |
| | | addValues.add(new AttributeValue(attrType, s)); |
| | | } |
| | | |
| | | Attribute addAttr = new Attribute(attrType, attrType.getNameOrOID(), |
| | | addValues); |
| | | builder = new AttributeBuilder(attrType); |
| | | builder.addAll(addValues); |
| | | Attribute addAttr = builder.toAttribute(); |
| | | modList.add(new Modification(ModificationType.ADD, addAttr)); |
| | | } |
| | | else |
| | |
| | | replaceValues.add(new AttributeValue(attrType, s)); |
| | | } |
| | | |
| | | Attribute addAttr = new Attribute(attrType, attrType.getNameOrOID(), |
| | | replaceValues); |
| | | AttributeBuilder builder = new AttributeBuilder(attrType); |
| | | builder.addAll(replaceValues); |
| | | Attribute addAttr = builder.toAttribute(); |
| | | modList.add(new Modification(ModificationType.REPLACE, addAttr)); |
| | | } |
| | | |
| | |
| | | try |
| | | { |
| | | DN mapperDN = config.getIdentityMapperDN(); |
| | | IdentityMapper mapper = DirectoryServer.getIdentityMapper(mapperDN); |
| | | IdentityMapper<?> mapper = DirectoryServer.getIdentityMapper(mapperDN); |
| | | if (mapper == null) |
| | | { |
| | | Message message = ERR_EXTOP_PASSMOD_NO_SUCH_ID_MAPPER.get( |
| | |
| | | |
| | | // Make sure that the specified identity mapper is OK. |
| | | DN mapperDN = null; |
| | | IdentityMapper mapper = null; |
| | | IdentityMapper<?> mapper = null; |
| | | try |
| | | { |
| | | mapperDN = config.getIdentityMapperDN(); |