On 09/07/2010 11:53, Simone Tripodi wrote: > Hola, > The OAuthRequest is just an entity that _represents_ OAuth request > data, nothing more. > The base string calculation has to be performed only when > signing/verifying the signature, there is no other case that requires > the base string, so I wonder why it has to be a common stuff.
> I wouldn't add yet another model/interface to represent this stuff, > alternatively the SignatureMethod interface could become and abstract > class that contains the base string calculation. OK - I'm coming around to your thinking on this. That means you can revert the whole of that commit on OAuthRequest. p > BTW I strongly discourage the second option since the base string > calculation requires BASE64 and custom URL encoding that, at least in > the codebase, requires the commons-codec dependency (and I wouldn't > re-invent the wheel) > > any other feedback? just Pid and I? > Simo > > http://people.apache.org/~simonetripodi/ > http://www.99soft.org/ > > > > On Fri, Jul 9, 2010 at 12:40 PM, Pid <[email protected]> wrote: >> On 09/07/2010 11:31, Simone Tripodi wrote: >>> I strongly don't agree that the base string calculation is a >>> OAuthReuqest task, rather than is an issue has to be performed by >>> Signing/Verifying methods. >> >> OK, well, it's another way to look at it. >> >>> Since there is only one method to calculate the base string, it can be >>> implemented in an abstract method implementation. >> >> Are you proposing that it's an entirely internal method then? >> (I added it because I couldn't see it exposed anywhere.) >> >> >> >> p >> >>> >>> http://people.apache.org/~simonetripodi/ >>> http://www.99soft.org/ >>> >>> >>> >>> On Fri, Jul 9, 2010 at 12:22 PM, Pid <[email protected]> wrote: >>>> On 09/07/2010 10:55, Simone Tripodi wrote: >>>>> Hi, >>>>> I just need few info about the OAuthRequest interface: >>>>> >>>>> - OAuthRequest#getSignatureBase(); just didn't understand what is it; >>>> >>>> A convenience method - it means the OAuthRequestImpl itself should know >>>> how to generate the sig base string, just like it would know how to >>>> generate it's toString method. >>>> >>>>> - OAuthRequest#setSignature(String signature); could be dropped since >>>>> it could be translated as OAuthRequest#addOAuthMessageParameter(new >>>>> OAuthMessageParameter(OAuthParameter.SIGNATURE, String value)); >>>> >>>> This is true - and more simple, i'll adjust my prototype to use your >>>> method and remove that one. >>>> >>>> >>>> p >>>> >>>>> Thanks in advance! >>>>> Simo >>>>> >>>>> http://people.apache.org/~simonetripodi/ >>>>> http://www.99soft.org/ >>>> >>>> >>>> >> >> >>
signature.asc
Description: OpenPGP digital signature
