-1

I am developing a OAuth 1.0 Service provider on .Net platform.I am not using DevDefined or DotnetOPenAuth. How do I generate a fresh request token every time a client request for one?(like using random numbers or something of that sort) Is there standard a logic for generating request tokens used across the platforms for OAuth? I have read the spec for the OAuth 1.0 and could not find any specifics on implementation logic.

Thanks!

  • This answer would get you started: http://stackoverflow.com/a/10398522/720985 – Ammar Dec 20 '13 at 18:44
  • I have already read those resources,My question is specifically how to generate a unique request token every time a client asks for one,from server.Thanks for the comment though.I am not using those libraries because I feel they are really complicated.My code works for generating correct signature,validating it etc.But right now everything is hard coded.I am stuck at this point because i am not able come up with a logic to generate unique request tokens. – Dhanesh Neela Mana Dec 20 '13 at 18:51
  • I should probably use this (http://stackoverflow.com/questions/4616685/how-to-generate-a-random-string-and-specify-the-length-you-want-or-better-gene/7977737#7977737).But not sure that is the best way to do it – Dhanesh Neela Mana Dec 20 '13 at 19:21

1 Answers1

1

If you have no problem with the length of the token, you can use a Guid.

var token = Guid.NewGuid().ToString();
giacomelli
  • 7,287
  • 2
  • 27
  • 31