Authenticate as remote user plugin

Plugin details

Provides a simple intereface to various Apache authentication systems to allow your Rails application to find out the currently logged in user. The plugin interface is similar to the Acts As Authenticated plugin, but it does no actual authentication.

Websitehttp://blog.craz8.com/authenticate-as-remote-user-plugin/ Repositoryhttp://craz8.com/svn/trunk/plugins/authenticate_as_remote_user/ Tags Login LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://craz8.com/svn/trunk/plugins/authenticate_as_remote_user/

rake

rake test:plugins PLUGIN=authenticate_as_remote_user



Include RemoteUser into controllers
Example:

class ApplicationController < ActionController::Base
     include RemoteUser
     ...



Implement the find_user method to load your user model
Example:

class ApplicationController < ActionController::Base

	include RemoteUser

	def find_user(remote_name)
		User.find_by_name(remote_name)
end



Imeplement the access_denied method
Example:

def access_denied!
     redirect_to access_denied_path and return false
end



Implement before_filter for login_required for actions you want to protect
Example:

class SomeController < ApplicationController
	before_filter :login_required, :only => [ :update, create, destroy ]



Optionally implement remote_property_name to match your Apache configuration
Example

def remote_property_name
	"HTTP_REMOTE_USER"
end

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: scott, 9 months ago