mace-opensaml-users - RE: SAMLNameIdentifier.equals
Subject: OpenSAML user discussion
List archive
- From: "Scott Cantor" <>
- To: "'Tom Scavo'" <>
- Cc: "'OpenSAML'" <>
- Subject: RE: SAMLNameIdentifier.equals
- Date: Fri, 13 Jan 2006 10:51:32 -0500
- Organization: The Ohio State University
> > but the unit test in the OpenSAML 1.1 head branch correctly do an
> > equality comparison on the string serialized format.
>
> Well, this doesn't always work. If one nameid has no format attribute
> and another nameid is explicitly set to 'unspecified', the two
> elements are comparable, aren't they? (I've written an equals method
> for SAMLNameIdentifier that takes this into account.)
Comparable, certainly. Equal? Depends on who you ask and why. They sure
aren't equal in the eyes of a digital signature.
In an extensible data model, comparison can be extremely complicated, and
leaving it outside the library allows applications to define what
equivalence means for a given use case. It has the downside of not enabling
certain kinds of algorithms, if those algorithms depend on Object.equals().
You don't have to agree with the trade-off I made, but I'm explaining that
the contract works the way I intended it to, that no objects are considered
"equal" unless they are the same object.
There may be a way I wasn't aware of in Java to disallow comparison of
objects that way. Sorry if I didn't use it.
I don't know whether Chad had planned to change this behavior or not. I'd
have to see how it would work in the general case before I would change my
mind.
-- Scott
- SAMLNameIdentifier.equals, Tom Scavo, 01/12/2006
- Re: SAMLNameIdentifier.equals, Chad La Joie, 01/12/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/12/2006
- Re: SAMLNameIdentifier.equals, Chad La Joie, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- Re: SAMLNameIdentifier.equals, Chad La Joie, 01/13/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/12/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- Re: SAMLNameIdentifier.equals, Chad La Joie, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- RE: SAMLNameIdentifier.equals, Scott Cantor, 01/13/2006
- Re: SAMLNameIdentifier.equals, Tom Scavo, 01/13/2006
- Re: SAMLNameIdentifier.equals, Chad La Joie, 01/13/2006
- Re: SAMLNameIdentifier.equals, Chad La Joie, 01/12/2006
Archive powered by MHonArc 2.6.16.