Class Rack::Auth::OpenIDAuth
In: lib/rack/auth/openid.rb
Parent: Rack::Auth::AbstractHandler

A class developed out of the request to use OpenID as an authentication middleware. The request will be sent to the OpenID instance unless the block evaluates to true. For example in rackup, you can use it as such:

  use Rack::Session::Pool
  use Rack::Auth::OpenIDAuth, realm, openid_options do |env|
    env['rack.session'][:authkey] == a_string
  end
  run RackApp

Or simply:

  app = Rack::Auth::OpenIDAuth.new app, realm, openid_options, &auth

Methods

call   new  

Attributes

oid  [R] 

Public Class methods

[Source]

     # File lib/rack/auth/openid.rb, line 469
469:       def initialize(app, realm, options={}, &auth)
470:         @oid = OpenID.new(realm, options)
471:         super(app, &auth)
472:       end

Public Instance methods

[Source]

     # File lib/rack/auth/openid.rb, line 474
474:       def call(env)
475:         to = auth.call(env) ? @app : @oid
476:         to.call env
477:       end

[Validate]