Sha256: 67db9517c154178db9c7849c80c1c0e6f3a2e4fcdfe68682aacf615cb932061b
Contents?: true
Size: 476 Bytes
Versions: 21
Compression:
Stored size: 476 Bytes
Contents
require 'rubygems' require 'ramaze' # Small application performing authentication without a database module Auth USERS = { 'demo' => Digest::SHA1.hexdigest('demo'), 'manveru' => Digest::SHA1.hexdigest('letmein'), } class AuthController < Ramaze::Controller map '/', :auth helper :auth layout :auth trait :auth_table => USERS before(:secret){ login_required } before(:login){ redirect r('/') if logged_in? } end end Ramaze.start
Version data entries
21 entries across 21 versions & 4 rubygems