Understanding the relevance of checkNonce method

23 views
Skip to first unread message

aum.s...@gmail.com

unread,
Dec 1, 2011, 12:09:38 PM12/1/11
to JOpenID Discussion Group
Hi,

I was playing around with the API and its working perfectly fine and i
am able to login to Yahoo/Gmail.
i was refreing the code of OpenIdServlet under "sample".

In this sample implimentation i saw a method checkNonce() where
"openid.response_nonce" is being passed as parameter.

then this parameter is being passed through some checks and in last 2
lines

if (isNonceExist(nonce))
throw new OpenIdException("Verify nonce failed.");
storeNonce(nonce, nonceTime + TWO_HOUR);


this has been checked in the database.I am unable to understand what
the purpose storing this in the database and checking it.
Please help me to understand this

Thanks in advance

Reply all
Reply to author
Forward
0 new messages