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

Version Path
Pistos-ramaze-2009.04.08 examples/app/auth/start.rb
Pistos-ramaze-2009.06.12 examples/app/auth/start.rb
manveru-ramaze-2009.04.01 examples/app/auth/start.rb
manveru-ramaze-2009.04.08 examples/app/auth/start.rb
manveru-ramaze-2009.04.18 examples/app/auth/start.rb
manveru-ramaze-2009.04.22 examples/app/auth/start.rb
manveru-ramaze-2009.04 examples/app/auth/start.rb
manveru-ramaze-2009.05.08 examples/app/auth/start.rb
manveru-ramaze-2009.05 examples/app/auth/start.rb
manveru-ramaze-2009.06.04 examples/app/auth/start.rb
manveru-ramaze-2009.06.12 examples/app/auth/start.rb
manveru-ramaze-2009.06 examples/app/auth/start.rb
manveru-ramaze-2009.07 examples/app/auth/start.rb
rjspotter-ramaze-2009.06.29 examples/app/auth/start.rb
rjspotter-ramaze-2009.06.31 examples/app/auth/start.rb
ramaze-2009.07 examples/app/auth/start.rb
ramaze-2009.04 examples/app/auth/start.rb
ramaze-2009.05 examples/app/auth/start.rb
ramaze-2009.06.04 examples/app/auth/start.rb
ramaze-2009.06.12 examples/app/auth/start.rb