Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 47
Registered: ‎06-27-2010
My Device: Bold 9700
My Carrier: AT&T

Re: OAuth / OAuth workaround?

Thanks for the tips.  I try to make the changes to my encoder tonight to see if it helps.

Contributor
Posts: 47
Registered: ‎06-27-2010
My Device: Bold 9700
My Carrier: AT&T

Re: OAuth / OAuth workaround?

made the changes...

 

Still no luck.... Smiley Sad

 

Failed to validate oauth signature and token

Contributor
Posts: 47
Registered: ‎06-27-2010
My Device: Bold 9700
My Carrier: AT&T

Re: OAuth / OAuth workaround?

Whoo Hoo Finally got a 200!!!  My last mistake was that I was not url encoding the signature before placing it into the authorization header.

 

Thanks everyone for the help.

Developer
Posts: 168
Registered: ‎11-22-2009
My Device: 9000 Bold, 8300 Curve

Re: OAuth / OAuth workaround?

Still no luck for me. For those that got it to work, did you just change the URLUTF8Encoder class result by adding toUpperCase at the end to the whole string?

 

Could someone post theirs?

Developer
Posts: 168
Registered: ‎11-22-2009
My Device: 9000 Bold, 8300 Curve

Re: OAuth / OAuth workaround?

Just an update.. I did get it working the other day. Turns out that it was a typo in my header building method. Using the netflix tool really helped though for seeing what signature to expect throughout the debugging process.

Developer
Posts: 272
Registered: ‎05-24-2010
My Device: DEV Alpha C & BB 9720
My Carrier: Idea and Airtel

Re: OAuth / OAuth workaround?

hi    kmbauer

 

 

can u tell me what changes should i make in your code which u posted ...

 

 

please help me..

 

i used your code getting 401 error...

 

can u post the source for urlEncoding method which you used ..

 

 

 

thanks regards

yakub pasha

 


Developer
Posts: 272
Registered: ‎05-24-2010
My Device: DEV Alpha C & BB 9720
My Carrier: Idea and Airtel

Re: OAuth / OAuth workaround?

thank you very much BaluKr54

 

its working perfectly after chnaging the hex vales to capitals in encoder...

Developer
Posts: 64
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Rogers

Re: OAuth / OAuth workaround?

[ Edited ]

Hi kmbauer,

 

I too get the signature

 

MUYmiobRdoK6s0ZVqo4xQNNO17w%3D (after url encoding)

 

when signing the exact string from the example.. did this turn out to be 'ok' or was there a mistake that prevented you from getting the exact same string of yUDBrcMMm6ghqBEKCFKVoJPIacU%3D ?

Contributor
Posts: 47
Registered: ‎06-27-2010
My Device: Bold 9700
My Carrier: AT&T

Re: OAuth / OAuth workaround?

I do not think you get the same string as they do.  I get the same string everytime I encode on my machine, but I think it is different form what you would get on any other machine.

 

Best I can tell anyway.

 

Developer
Posts: 64
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Rogers

Re: OAuth / OAuth workaround?

Ok, dumb mistake on my end.. the header name is Authorization not OAuth, as in

 

connection.setRequestProperty("Authorization", oAuthHeader);

 

and to answer my own question, getting the different signature for the same string is apparently fine.