Class: Warden::OpenID::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/warden/openid.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optional_fieldsObject

Returns the value of attribute optional_fields.



15
16
17
# File 'lib/warden/openid.rb', line 15

def optional_fields
  @optional_fields
end

#policy_urlObject

Returns the value of attribute policy_url.



15
16
17
# File 'lib/warden/openid.rb', line 15

def policy_url
  @policy_url
end

#required_fieldsObject

Returns the value of attribute required_fields.



15
16
17
# File 'lib/warden/openid.rb', line 15

def required_fields
  @required_fields
end

Instance Method Details

#find_user(response) ⇒ Object



21
22
23
24
# File 'lib/warden/openid.rb', line 21

def find_user(response)
  raise "Warden::OpenID::Config#user_finder has not been set yet.\n\n#{Warden::OpenID::CONFIG_EXAMPLE}" unless @user_finder
  @user_finder.call(response)
end

#to_paramsObject



26
27
28
29
30
31
32
# File 'lib/warden/openid.rb', line 26

def to_params
  {
    :required   => required_fields,
    :optional   => optional_fields,
    :policy_url => policy_url
  }
end

#user_finder(&block) ⇒ Object



17
18
19
# File 'lib/warden/openid.rb', line 17

def user_finder(&block)
  @user_finder = block
end