Click here to Skip to main content
11,703,631 members (68,202 online)

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions.

Technical discussions are encouraged, but click here to ask your programming question.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Okay, Now It's Officially Summer Pin
Ravi Bhavnani30-Jun-13 11:06
professionalRavi Bhavnani30-Jun-13 11:06 
GeneralRe: Okay, Now It's Officially Summer Pin
bryce30-Jun-13 12:54
memberbryce30-Jun-13 12:54 
GeneralDamn Cookies! Pin
Dalek Dave28-Jun-13 13:50
memberDalek Dave28-Jun-13 13:50 
GeneralRe: Damn Cookies! Pin
Marc Clifton28-Jun-13 14:19
protectorMarc Clifton28-Jun-13 14:19 
GeneralRe: Damn Cookies! Pin
Dalek Dave28-Jun-13 14:27
memberDalek Dave28-Jun-13 14:27 
GeneralRe: Damn Cookies! Pin
Marc Clifton28-Jun-13 14:39
protectorMarc Clifton28-Jun-13 14:39 
GeneralRe: Damn Cookies! Pin
Dalek Dave28-Jun-13 14:51
memberDalek Dave28-Jun-13 14:51 
GeneralRe: Damn Cookies! Pin
BillWoodruff28-Jun-13 18:42
memberBillWoodruff28-Jun-13 18:42 
GeneralRe: Damn Cookies! Pin
Marc Clifton29-Jun-13 3:11
protectorMarc Clifton29-Jun-13 3:11 
GeneralRe: Damn Cookies! Pin
NeverJustHere29-Jun-13 21:37
memberNeverJustHere29-Jun-13 21:37 
GeneralRe: Damn Cookies! Pin
ahmed zahmed30-Jun-13 5:49
memberahmed zahmed30-Jun-13 5:49 
GeneralRe: Damn Cookies! Pin
BCantor1-Jul-13 8:46
memberBCantor1-Jul-13 8:46 
GeneralRe: Damn Cookies! Pin
BillWoodruff28-Jun-13 18:44
memberBillWoodruff28-Jun-13 18:44 
GeneralRe: Damn Cookies! Pin
Marc Clifton29-Jun-13 3:10
protectorMarc Clifton29-Jun-13 3:10 
BillWoodruff wrote:
Care to open the kimono a little, and mention, in general terms, how you did this.


I've only done this in Ruby on Rails because that's what I've used to write a couple websites, but I'm sure the code:

# create an authentication token if the user has clicked on remember me
   auth_token = SecureRandom.urlsafe_base64
   user.authentication_token = auth_token
   cookies.permanent[:auth_token] = auth_token

is very similar to what you can do with ASP.NET. Here, both the cookie key and its data are a random code. Now, there are also many algorithms, from simple hashing to more complex encryption, that you can use for data rather than just storing random authentication codes.

From my article: User Authentication in Ruby on Rails[^]

Marc

GeneralRe: Damn Cookies! Pin
TnTinMn29-Jun-13 2:26
memberTnTinMn29-Jun-13 2:26 
GeneralRe: Damn Cookies! Pin
_Maxxx_29-Jun-13 2:34
member_Maxxx_29-Jun-13 2:34 
GeneralRe: Damn Cookies! Pin
Dalek Dave29-Jun-13 2:51
memberDalek Dave29-Jun-13 2:51 
GeneralRe: Damn Cookies! Pin
TnTinMn29-Jun-13 3:02
memberTnTinMn29-Jun-13 3:02 
GeneralRe: Damn Cookies! Pin
harold aptroot29-Jun-13 2:41
memberharold aptroot29-Jun-13 2:41 
GeneralRe: Damn Cookies! Pin
TnTinMn29-Jun-13 2:59
memberTnTinMn29-Jun-13 2:59 
GeneralRe: Damn Cookies! Pin
harold aptroot29-Jun-13 4:05
memberharold aptroot29-Jun-13 4:05 
GeneralRe: Damn Cookies! Pin
Cornelius Henning29-Jun-13 4:06
memberCornelius Henning29-Jun-13 4:06 
GeneralRe: Damn Cookies! Pin
harold aptroot29-Jun-13 4:09
memberharold aptroot29-Jun-13 4:09 
GeneralRe: Damn Cookies! Pin
Cornelius Henning29-Jun-13 6:54
memberCornelius Henning29-Jun-13 6:54 
GeneralMy Windows Macbook Air: perf results Pin
Chris Maunder28-Jun-13 7:09
adminChris Maunder28-Jun-13 7:09 
GeneralRe: My Windows Macbook Air: perf results Pin
Richard Deeming28-Jun-13 7:12
professionalRichard Deeming28-Jun-13 7:12 
GeneralRe: My Windows Macbook Air: perf results Pin
lewax0028-Jun-13 7:17
memberlewax0028-Jun-13 7:17 
GeneralRe: My Windows Macbook Air: perf results Pin
Richard Deeming28-Jun-13 7:21
professionalRichard Deeming28-Jun-13 7:21 
GeneralRe: My Windows Macbook Air: perf results Pin
Emmanuel Medina Lopez28-Jun-13 7:42
professionalEmmanuel Medina Lopez28-Jun-13 7:42 
GeneralRe: My Windows Macbook Air: perf results Pin
thrakazog28-Jun-13 11:18
memberthrakazog28-Jun-13 11:18 
GeneralRe: My Windows Macbook Air: perf results Pin
Chris C-B28-Jun-13 7:15
memberChris C-B28-Jun-13 7:15 
GeneralRe: My Windows Macbook Air: perf results Pin
Rutvik Dave28-Jun-13 7:33
professionalRutvik Dave28-Jun-13 7:33 
GeneralRe: My Windows Macbook Air: perf results Pin
DaveAuld29-Jun-13 5:32
protectorDaveAuld29-Jun-13 5:32 
GeneralRe: My Windows Macbook Air: perf results Pin
Deyan Georgiev28-Jun-13 7:52
memberDeyan Georgiev28-Jun-13 7:52 
GeneralRe: My Windows Macbook Air: perf results Pin
Deyan Georgiev28-Jun-13 8:00
memberDeyan Georgiev28-Jun-13 8:00 
GeneralRe: My Windows Macbook Air: perf results Pin
Chris Maunder28-Jun-13 8:46
adminChris Maunder28-Jun-13 8:46 
GeneralRe: My Windows Macbook Air: perf results Pin
S Douglas28-Jun-13 9:56
professionalS Douglas28-Jun-13 9:56 
GeneralRe: My Windows Macbook Air: perf results Pin
S Houghtelin28-Jun-13 8:42
professionalS Houghtelin28-Jun-13 8:42 
GeneralRe: My Windows Macbook Air: perf results Pin
Dennis E White28-Jun-13 9:17
professionalDennis E White28-Jun-13 9:17 
GeneralRe: My Windows Macbook Air: perf results Pin
Matthew Faithfull28-Jun-13 9:45
professionalMatthew Faithfull28-Jun-13 9:45 
GeneralRe: My Windows Macbook Air: perf results Pin
ahmed zahmed29-Jun-13 10:28
memberahmed zahmed29-Jun-13 10:28 
GeneralRe: My Windows Macbook Air: perf results Pin
Joe Woodbury28-Jun-13 11:17
memberJoe Woodbury28-Jun-13 11:17 
GeneralRe: My Windows Macbook Air: perf results Pin
Michael Martin 28-Jun-13 11:27
member Michael Martin 28-Jun-13 11:27 
GeneralRe: My Windows Macbook Air: perf results Pin
_Maxxx_28-Jun-13 11:37
member_Maxxx_28-Jun-13 11:37 
GeneralRe: My Windows Macbook Air: perf results Pin
Chris Maunder28-Jun-13 16:28
adminChris Maunder28-Jun-13 16:28 
GeneralRe: My Windows Macbook Air: perf results Pin
_Maxxx_29-Jun-13 2:35
member_Maxxx_29-Jun-13 2:35 
GeneralRe: My Windows Macbook Air: perf results Pin
Jörgen Andersson28-Jun-13 12:19
professionalJörgen Andersson28-Jun-13 12:19 
GeneralRe: My Windows Macbook Air: perf results Pin
Chris Maunder28-Jun-13 16:29
adminChris Maunder28-Jun-13 16:29 
GeneralRe: My Windows Macbook Air: perf results Pin
Jörgen Andersson28-Jun-13 19:39
professionalJörgen Andersson28-Jun-13 19:39 
GeneralRe: My perfect results, while perfect, weren't perfectly received Pin
BCantor28-Jun-13 12:45
memberBCantor28-Jun-13 12:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 28 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid