Class: OauthTokenVerifier::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/oauth_token_verifier/configuration.rb

Defined Under Namespace

Classes: ProviderSettings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/oauth_token_verifier/configuration.rb', line 6

def initialize
  @enabled_providers = []

  @google = ProviderSettings.new({
                                   first_name: :given_name,
                                   last_name: :family_name
                                 }, 'google', 'email')

  @vk = ProviderSettings.new({
                               first_name: :first_name,
                               last_name: :last_name
                             }, 'vk', 'uid', '5.0')

  @facebook = ProviderSettings.new({
                                     first_name: :name
                                   }, 'facebook', 'id')
end

Instance Attribute Details

#enabled_providersObject

Returns the value of attribute enabled_providers.



3
4
5
# File 'lib/oauth_token_verifier/configuration.rb', line 3

def enabled_providers
  @enabled_providers
end

#facebookObject

Returns the value of attribute facebook.



3
4
5
# File 'lib/oauth_token_verifier/configuration.rb', line 3

def facebook
  @facebook
end

#googleObject

Returns the value of attribute google.



3
4
5
# File 'lib/oauth_token_verifier/configuration.rb', line 3

def google
  @google
end

#vkObject

Returns the value of attribute vk.



3
4
5
# File 'lib/oauth_token_verifier/configuration.rb', line 3

def vk
  @vk
end