Plugins - Sexy Temp Passwords

StarAdd to favorites
Overview
If you ever had to give a user a random password (reset, etc), it probably looked like:

sdf35’kfl235jfl

With the Sexy Temp Passwords plugin, now it’s trivial to give users a password like:

rebecca1539, alphabet2067, lazarus1412, etc

It combines a dictionary of common english names/words with 4 random digits between 1 and 9. (probability space of ~6,769,323 unique passwords)

Installation
  
  ruby script/plugin install http://sexy-temp-passwords.googlecode.com/svn/sexy_temp_passwords/

Example Usage
class User < ActiveRecord::Base
  include SexyTempPasswords

  def reset_password
    # Not that you'd ever store the plaintext password, but for demonstration purposes:
    self.password = User.sexy_temp_password
    save!
  end

end

u = User.find(:first)
u.reset_password
u.reload.password # 'allison1437' or whatever random password was generated

Shanti A. Braford

http://shanti.railsblog.com

http://sexy-temp-passwords.googlecode.com/svn/sexy_temp_passwords/

Rails' (MIT)

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Model

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?