# Authenticaton and authorisation tutorial

**URL:** <https://www.ruby-forum.com/t/authenticaton-and-authorisation-tutorial/175442>\
**Category:** Rails\
**Created:** [September 14, 2009, 2:30am UTC](https://www.ruby-forum.com/t/authenticaton-and-authorisation-tutorial/175442 "2009-09-14T02:30:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrismalek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Post date:** [September 14, 2009, 2:30am UTC](https://www.ruby-forum.com/t/authenticaton-and-authorisation-tutorial/175442/1 "2009-09-14T02:30:07Z")

</div>

Hi All,

I’m new to Ruby and Rails. Everything I’ve done before has been in  
Java. Some time ago I created a website ([http://www.thebirthnews.com](http://www.thebirthnews.com))  
in RoR which needed authentication, authorisation, file uploads and a  
few more things. I gleaned much of the knowledge from the web and  
adapted it for my purposes. In the process I implemented some things  
which will no doubt be handy to many Ruby on Rails people. So I wrote a  
tutorial on how to do authentication and authorisation. This works like  
this: user signs up → user gets e-mail with two links (delete me and  
activate me) → user clicks activate link and is taken to the sign in  
page with a message displaying saying he can now sign in. The user can  
also request a new password which is e-mailed to him. Passwords are  
stored in a hashed form. User IDs are globally unique identifiers, not  
integers incrementing from 1. Some webmail e-mail adresses, like  
hotmail, are not accepted for registration purposes. All the code is  
supplied. Note that much of this is not original work, just what others  
did before, but adapted. The tutorial is here:  
[http://www.databaseapplications.com.au/authentication.jsp](http://www.databaseapplications.com.au/authentication.jsp) The code is  
available for download and you can leave comments.

Hope some of you find this useful.
