class NimbleAuth::Configuration

Attributes

facebook_app_id[RW]

Configuration for Facebook OAuth

facebook_app_secret[RW]
google_app_id[RW]

Configuration for Google OAuth

google_app_secret[RW]
omniauth_providers[RW]

List of supported Oauth Providers

resource_class[RW]

The model in the host application from which the engine User model is extended from It defaults to simply 'User' @return [String]

resource_identity_class[RW]

The model in the host application from which the engine Identity model is extended from It defaults to simply 'Identity' @return [String]

Public Class Methods

new() click to toggle source
# File lib/nimble_auth.rb, line 30
def initialize
  @resource_class = 'User'
  @resource_identity_class = 'Identity'
end

Public Instance Methods

valid?() click to toggle source
# File lib/nimble_auth.rb, line 35
def valid?
  resource_class.present? && resource_class_defined?
end

Private Instance Methods

resource_class_defined?() click to toggle source
# File lib/nimble_auth.rb, line 41
def resource_class_defined?
  resource_class.constantize.present?
rescue StandardError
  false
end