Class: NimbleAuth::Configuration
- Inherits:
-
Object
- Object
- NimbleAuth::Configuration
- Defined in:
- lib/nimble_auth.rb
Instance Attribute Summary collapse
-
#facebook_app_id ⇒ Object
Configuration for Facebook OAuth.
-
#facebook_app_secret ⇒ Object
Returns the value of attribute facebook_app_secret.
-
#google_app_id ⇒ Object
Configuration for Google OAuth.
-
#google_app_secret ⇒ Object
Returns the value of attribute google_app_secret.
-
#omniauth_providers ⇒ Object
List of supported Oauth Providers.
-
#resource_class ⇒ String
The model in the host application from which the engine User model is extended from It defaults to simply ‘User’.
-
#resource_identity_class ⇒ String
The model in the host application from which the engine Identity model is extended from It defaults to simply ‘Identity’.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
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_id ⇒ Object
Configuration for Facebook OAuth
23 24 25 |
# File 'lib/nimble_auth.rb', line 23 def facebook_app_id @facebook_app_id end |
#facebook_app_secret ⇒ Object
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_id ⇒ Object
Configuration for Google OAuth
27 28 29 |
# File 'lib/nimble_auth.rb', line 27 def google_app_id @google_app_id end |
#google_app_secret ⇒ Object
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_providers ⇒ Object
List of supported Oauth Providers
20 21 22 |
# File 'lib/nimble_auth.rb', line 20 def omniauth_providers @omniauth_providers end |
#resource_class ⇒ String
The model in the host application from which the engine User model is extended from It defaults to simply ‘User’
12 13 14 |
# File 'lib/nimble_auth.rb', line 12 def resource_class @resource_class end |
#resource_identity_class ⇒ String
The model in the host application from which the engine Identity model is extended from It defaults to simply ‘Identity’
17 18 19 |
# File 'lib/nimble_auth.rb', line 17 def resource_identity_class @resource_identity_class end |
Instance Method Details
#valid? ⇒ Boolean
35 36 37 |
# File 'lib/nimble_auth.rb', line 35 def valid? resource_class.present? && resource_class_defined? end |