Class: NimbleAuth::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



30
31
32
33
# File 'lib/nimble_auth.rb', line 30

def initialize
  @resource_class = 'User'
  @resource_identity_class = 'Identity'
end

Instance Attribute Details

#facebook_app_idObject

Configuration for Facebook OAuth



23
24
25
# File 'lib/nimble_auth.rb', line 23

def facebook_app_id
  @facebook_app_id
end

#facebook_app_secretObject

Returns the value of attribute facebook_app_secret.



24
25
26
# File 'lib/nimble_auth.rb', line 24

def facebook_app_secret
  @facebook_app_secret
end

#google_app_idObject

Configuration for Google OAuth



27
28
29
# File 'lib/nimble_auth.rb', line 27

def google_app_id
  @google_app_id
end

#google_app_secretObject

Returns the value of attribute google_app_secret.



28
29
30
# File 'lib/nimble_auth.rb', line 28

def google_app_secret
  @google_app_secret
end

#omniauth_providersObject

List of supported Oauth Providers



20
21
22
# File 'lib/nimble_auth.rb', line 20

def omniauth_providers
  @omniauth_providers
end

#resource_classString

The model in the host application from which the engine User model is extended from It defaults to simply ‘User’

Returns:

  • (String)


12
13
14
# File 'lib/nimble_auth.rb', line 12

def resource_class
  @resource_class
end

#resource_identity_classString

The model in the host application from which the engine Identity model is extended from It defaults to simply ‘Identity’

Returns:

  • (String)


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

def resource_identity_class
  @resource_identity_class
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/nimble_auth.rb', line 35

def valid?
  resource_class.present? && resource_class_defined?
end