"Bad Signature" in JanRain PHP Library
Jonathan Daugherty
cygnus at janrain.com
Thu Sep 13 09:27:53 PDT 2007
# Well I figured out the problem and was able to get it working. The
# problem was that the secret was not being stored correctly in MySQL.
# The MySQLStore class overrode the blob_encode method, but not the
# blob_decode. Is there any reason this was done or is it a bug? It
# may be that the hex representation works with DB but not with MDB2
# in my implementation, but I am not sure.
Only encoding was overridden because the bytes are returned in raw
form, so no decoding is necessary. The encoding override is to
eliminate ambiguity by encoding as a hex literal (note the leading
'0x'). There's no reason that shouldn't work, but if you're able to
do any further investigation to see what was going wrong, I'd be very
interested to hear about it. (What version of MySQL are you running?)
# What I did to fix it was I overrode both the blob_decode and
# blob_encode methods. I ended up using base64 instead of hex and
# changed the field to a varchar instead of a blob, but it is now
# working.
I'm glad it works now.
--
Jonathan Daugherty
JanRain, Inc.
irc.freenode.net: cygnus in #openid
cygnus.myopenid.com
More information about the Dev
mailing list