Absolutely correct. (A "justice of the peace" is a fancy old-fashioned word for judge.)
My first wedding was solemnized by a judge at a courthouse. My second wedding was solemnized by a dude on a ski slope at 10,000 feet altitude.
When you hear the words in most vows, "... and now, by the authority vested in me by the State of _____, I pronounce you ____" -- that person has been authorized to solemnize marriages in the State/County in which the marriage license was obtained. Each state's marital statute defines the marital laws.
For instance, in Illinois:
http://www.ilga.gov/legislation/ilcs...6&ChapterID=59
http://www.ilga.gov/legislation/ilcs...SeqEnd=3000000
(750 ILCS 5/209) (from Ch. 40, par. 209)
Sec. 209. Solemnization and Registration.)
(a) A marriage may be solemnized by a judge of a court of record, by a retired judge of a court of record, unless the retired judge was removed from office by the Judicial Inquiry Board, except that a retired judge shall not receive any compensation from the State, a county or any unit of local government in return for the solemnization of a marriage and there shall be no effect upon any pension benefits conferred by the Judges Retirement System of Illinois, by a judge of the Court of Claims, by a county clerk in counties having 2,000,000 or more inhabitants, by a public official whose powers include solemnization of marriages, or in accordance with the prescriptions of any religious denomination, Indian Nation or Tribe or Native Group, provided that when such prescriptions require an officiant, the officiant be in good standing with his religious denomination, Indian Nation or Tribe or Native Group. Either the person solemnizing the marriage, or, if no individual acting alone solemnized the marriage, both parties to the marriage, shall complete the marriage certificate form and forward it to the county clerk within 10 days after such marriage is solemnized.
(b) The solemnization of the marriage is not invalidated by the fact that the person solemnizing the marriage was not legally qualified to solemnize it, if either party to the marriage believed him to be so qualified or by the fact that the marriage was inadvertently solemnized in a county in Illinois other than the county where the license was issued.
(Source: P.A. 95-775, eff. 1-1-09.)
State of California (my second wedding, at Heavenly, California side):
http://www.leginfo.ca.gov/cgi-bin/di...0&file=400-402
00. Marriage may be solemnized by any of the following who is of
the age of 18 years or older:
(a) A priest, minister, rabbi, or authorized person of any
religious denomination.
(b) A judge or retired judge, commissioner of civil marriages or
retired commissioner of civil marriages, commissioner or retired
commissioner, or assistant commissioner of a court of record in this
state.
(c) A judge or magistrate who has resigned from office.
(d) Any of the following judges or magistrates of the United
States:
(1) A justice or retired justice of the United States Supreme
Court.
(2) A judge or retired judge of a court of appeals, a district
court, or a court created by an act of Congress the judges of which
are entitled to hold office during good behavior.
(3) A judge or retired judge of a bankruptcy court or a tax court.
(4) A United States magistrate or retired magistrate.
(e) A legislator or constitutional officer of this state or a
Member of Congress who represents a district within this state, while
that person holds office.