Enacted on September 21, 1996 and signed by former President Clinton, DOMA defines marriage as a legal union between a man and a woman. It also makes it that no state, or other subdivision within the US, has to recognize a same-sex relationship considered a marriage by another state. Just how legal is this act?
The act is broken into three sections, only two of which are effective. Section 2 is what allows states to not recognize same-sex marriages performed in other states. Following the "Full Faith and Credit Clause" of Article 4 section 1 of the Constitution, all states are required to honor all "public acts, records, and judicial proceedings of every other state". However, Congress is also allowed to legislate on what these obligations are. Under DOMA, Congress excluded same-sex marriages from the state acts that other states had to recognize. This section then has to be argued on seperate grounds that become more of a matter on interpretation and personal beliefs. That of course makes things highly irregular and most arguments rather illogical.
Section 3, the other effective section, prevents the federal government from recognizing the validity of same-sex marriages. This, of course, falls into a similar state as Section 2, where in it can now only be argued on interpretation of what is discrimination and a person's beliefs. It has, however, been found unconstitutional in two Massachusetts cout cases and the Obama Administration. The court ruling is currently under appeal.
tl;dr: Technically legal, can only argue by personal beliefs.