Class: Chowder::OpenID

Inherits:
Base
  • Object
show all
Defined in:
lib/chowder.rb

Constant Summary

Constants inherited from Base

Base::LOGIN_VIEW

Instance Method Summary collapse

Methods inherited from Base

#authorize, #find_login_template, #initialize, #return_or_redirect_to

Constructor Details

This class inherits a constructor from Chowder::Base

Instance Method Details

#hostObject



70
71
72
73
# File 'lib/chowder.rb', line 70

def host
  host = env['HTTP_HOST'] || "#{env['SERVER_NAME']}:#{env['SERVER_PORT']}"
  "http://#{host}"
end

#setup_consumerObject



75
76
77
78
79
# File 'lib/chowder.rb', line 75

def setup_consumer
  store = ::OpenID::Store::Filesystem.new('.openid')
  osession = session[:openid] ||= {}
  @consumer = ::OpenID::Consumer.new(osession, store)
end