markpercival / simple_admin

A simple Open ID auth plugin for userless apps

This URL has Read+Write access

name age message
file .gitignore Mon Nov 02 22:02:00 -0800 2009 initial import [markpercival]
file README.markdown Tue Nov 10 09:15:18 -0800 2009 Updating the Readme [markpercival]
file Rakefile Mon Nov 02 22:02:00 -0800 2009 initial import [markpercival]
directory app/ Thu Nov 05 07:13:27 -0800 2009 fixed and working [markpercival]
directory config/ Mon Nov 02 22:02:00 -0800 2009 initial import [markpercival]
directory doc/ Mon Nov 02 22:02:00 -0800 2009 initial import [markpercival]
file init.rb Thu Nov 05 07:13:27 -0800 2009 fixed and working [markpercival]
directory lib/ Thu Nov 05 07:13:27 -0800 2009 fixed and working [markpercival]
directory log/ Mon Nov 02 22:02:00 -0800 2009 initial import [markpercival]
directory public/ Mon Nov 02 22:02:00 -0800 2009 initial import [markpercival]
directory test/ Thu Nov 05 07:13:27 -0800 2009 fixed and working [markpercival]
README.markdown

Simple Admin

A database-less admin authentication based on OpenID

Requires the following gems

  • ruby-openid
  • rack-openid

Installation

Install the plugin

script/plugin install git://github.com/markpercival/simple_admin.git

Add the following before filter to any protected controllers

before_filter :ensure_admin

List the authorized OpenId's in 'config/simple_admins.yml'

- markpercival.us
- mark.squarepush.com

When you login you should see this

Login

The following helpers are available in your controller and views:

  • current_user - returns the current authenticated user
  • authorized? - tells you whether or not the current session is authenticated