Sha256: dcc85cd51d227ccf98bb63d5bb34afbd20f2e1c26e5ece97e36ffeb4d530f738

Contents?: true

Size: 1.06 KB

Versions: 23

Compression:

Stored size: 1.06 KB

Contents

# all these methods must return true or false
module AuthlogicConnect::Openid::State

  # 1. to call
  def openid_request?
    !openid_identifier.blank? && auth_session[:auth_attributes].nil?
  end
  
  def openid_identifier?
    openid_request?
  end
  
  def openid_provider?
    
  end
  
  # 2. from call
  # better check needed
  def openid_response?
    auth_controller? && !auth_session[:auth_attributes].nil? && auth_session[:auth_method] == "openid"
  end
  alias_method :openid_complete?, :openid_response?
  
  # 3. either to or from call
  # this should include more!
  # we know we are using open id if:
  #   the params passed in have "openid_identifier"
  def using_openid?
    auth_controller? && (openid_request? || openid_response?)
  end
  
  def authenticating_with_openid?
    auth_controller? && auth_class.activated? && using_openid?
  end
  
  def start_openid?
    authenticating_with_openid? && !openid_response?
  end

  def complete_openid?
    openid_complete?
  end
  
  def validate_password_with_openid?
    !using_openid? && require_password?
  end
  
end

Version data entries

23 entries across 23 versions & 7 rubygems

Version Path
robdimarco-authlogic-connect-0.0.6 lib/authlogic_connect/openid/state.rb
anideo-authlogic-connect-0.0.6 lib/authlogic_connect/openid/state.rb
jspooner-authlogic-connect-0.0.20 lib/authlogic_connect/openid/state.rb
jspooner-authlogic-connect-0.0.19 lib/authlogic_connect/openid/state.rb
foreverman-authlogic-connect-0.0.4 lib/authlogic_connect/openid/state.rb
foreverman-authlogic-connect-0.0.3 lib/authlogic_connect/openid/state.rb
foreverman-authlogic-connect-0.0.2 lib/authlogic_connect/openid/state.rb
foreverman-authlogic-connect-0.0.1 lib/authlogic_connect/openid/state.rb
foreverman-authlogic-connect-0.0.6 lib/authlogic_connect/openid/state.rb
authlogic-connect-andrewacove-0.5.7 lib/authlogic_connect/openid/state.rb
authlogic-connect-0.0.6 lib/authlogic_connect/openid/state.rb
authlogic-connect-0.0.5.1 lib/authlogic_connect/openid/state.rb
authlogic-connect-0.0.5 lib/authlogic_connect/openid/state.rb
authlogic-connect-andrewacove-0.5.6 lib/authlogic_connect/openid/state.rb
authlogic-connect-andrewacove-0.5.5 lib/authlogic_connect/openid/state.rb
authlogic-connect-andrewacove-0.5.4 lib/authlogic_connect/openid/state.rb
authlogic-connect-andrewacove-0.5.2 lib/authlogic_connect/openid/state.rb
authlogic-connect-andrewacove-0.5.0 lib/authlogic_connect/openid/state.rb
authlogic-connect-0.0.4.06 lib/authlogic_connect/openid/state.rb
authlogic-connect-x-0.0.4.05x lib/authlogic_connect/openid/state.rb