class Auth::Configuration

Attributes

assembly_class[RW]
assembly_controller[RW]
auth_resources[RW]
booking_class[RW]
booking_controller[RW]
brand_name[RW]
bullet_class[RW]
bullet_controller[RW]
cart_class[RW]
cart_controller[RW]
cart_controller_token_auth_actions[RW]
cart_item_class[RW]
cart_item_controller[RW]
cart_item_controller_token_auth_actions[RW]
category_class[RW]

CURRENTLY USED ####

category_controller[RW]
communication_class[RW]
communication_controller[RW]
consumable_class[RW]

workflow accessors.

consumable_controller[RW]
currency[RW]
cycle_class[RW]
cycle_controller[RW]
discount_class[RW]
discount_controller[RW]
do_redirect[RW]
enable_barcode_api[RW]

FOR BARCODE.

enable_sign_in_modals[RW]
enable_token_auth[RW]
endpoint_class[RW]
endpoint_controller[RW]
entity_class[RW]
entity_controller[RW]
hashids_alphabet[RW]
hashids_salt[RW]

HASHIDS SALT. THIS IS USED IN PERSONALITY AND PLACE.

host_name[RW]

used in lib/auth/omniauth.rb inside Google_OAuth2.class_eval

image_class[RW]

image concern accessors

image_controller[RW]
instruction_class[RW]
instruction_controller[RW]
location_class[RW]

CURRENTLY USED

location_controller[RW]
mail_from[RW]
mailer_class[RW]

the class used in the user_concern, to send emails. should inherit from Auth::Notifier. the class used to send the notification

minute_class[RW]
minute_controller[RW]
mount_path[RW]
navbar[RW]
new_mailer_class[RW]

the new mailer class being used in Auth::Work::Notification.

notification_class[RW]
notification_response_class[RW]
oauth_credentials[RW]
order_class[RW]
order_controller[RW]
otp_controller[RW]
overlap_class[RW]

this is also no longer user.

overlap_controller[RW]
payment_class[RW]
payment_controller[RW]
payment_gateway_info[RW]
personality_class[RW]

for shopping personality.

personality_controller[RW]
place_class[RW]

for shopping place.

place_controller[RW]
prevent_oauth_merger[RW]
product_class[RW]
product_controller[RW]
profiles_controller[RW]

FOR PROFILES.

protect_image_with_recaptcha[RW]

basically does not apply if the user is signed in. otherwise will apply.

queue_adapter[RW]

the queue adapter for the delayed jobs @used in OtpJob

recaptcha[RW]
redis_config_file_location[RW]
requirement_class[RW]
requirement_controller[RW]
rolling_minutes[RW]

WORK CONSTANTS.

schedule_class[RW]

these three are not used.

schedule_controller[RW]
simulate_invalid_otp[RW]
slot_class[RW]
slot_controller[RW]
sop_class[RW]
sop_controller[RW]
specification_class[RW]
specification_controller[RW]
stage_class[RW]
stage_controller[RW]
state_class[RW]
state_controller[RW]
step_class[RW]
step_controller[RW]
stub_otp_api_calls[RW]
third_party_api_keys[RW]
tlocation_class[RW]

this tlocation thing is no longer used.

tlocation_controller[RW]
token_regeneration_time[RW]
two_factor_otp_transactional_sms_template_name[RW]
two_factor_otp_transactional_sms_template_sender_id[RW]

THIRD PARTY ATTRIBUTES.

use_es[RW]

whether to use es or not.

user_class[RW]

Public Class Methods

new() click to toggle source
# File lib/auth/engine.rb, line 276
def initialize
  

  ##############################################################
  ##
  ## CSS BASED OPTIONS.
  ##
  ##############################################################
  
  ## whether there should be modals for sign-in / sign-up
  ## ensure to include the css and js files as mentioned in the readme.
  @enable_sign_in_modals = false
  
  ## this is shown on the left hand side of the navbar.
  @brand_name = "Your App Name"

  ## whether there should be a navbar as shown in the image in the readme.
  @navbar = false

  #############################################################
  ##
  ## AUTHENTICATION OPTIONS.
  ##
  #############################################################
  
  ## whether token authentication should be enabled
  @enable_token_auth = true

  ##the regeneration time of the auth_token,
  ##after the following mentioned time, the token is useless
  @token_regeneration_time = 1.day

  ## the oauth provider details, an empty hash will disable oauth authentication
  @oauth_credentials = {}
  
  ## which models the engine should use for authentication
  @auth_resources = {}

  ## whether recaptcha should be enabled or not.
  ## false by default.
  ## if set to true, will produce errors all over the place in case you forget to provide a recaptcha key and secret in the configuration file!
  @recaptcha = false


  ## if set to true, wil prevent merging of oauth accounts if they share the same email id.
  ## by default is false.
  @prevent_oauth_merger = false

  ##############################################################
  ##
  ## ENGINE BASED OPTIONS.
  ##
  ##############################################################
  @mount_path = "/authenticate"
  @redis_config_file_location = nil
  @third_party_api_keys = {}
  ##whether to redirect to redirect urls if provided in the
  ##request.
  @do_redirect = true
  @host_name = nil
  ## for the user.
  @user_class = nil

  ###############################################################
  ##
  ## OPTIONS FOR TESTS
  ##
  ###############################################################
  @stub_otp_api_calls = false
  @simulate_invalid_otp = false

  ###############################################################
  ##
  ## OPTIONS FOR OTP
  ##
  ###############################################################
  @otp_controller = nil


  ###############################################################
  ##
  ## OPTIONS FOR SHOPPING MODULE
  ##
  ###############################################################
  @cart_item_controller = nil
  @cart_item_controller_token_auth_actions = [:create,:update,:destroy,:edit,:new,:index,:show,:create_multiple]
  @cart_item_class = nil
  @cart_controller = nil
  @cart_controller_token_auth_actions = [:create,:update,:destroy,:edit,:new,:index,:show]
  @cart_class = nil
  @payment_controller = nil
  @payment_class = nil
  @payment_gateway_info = {}
  @product_class = nil
  @product_controller = nil
  @discount_class = nil
  @discount_controller = nil
  ## add this to the routes.
  ## if you are going to add place, then add that here as well.
  @personality_class = nil
  @personality_controller = nil
  @place_class = nil
  @place_controller = nil

  ###############################################################
  ##
  ## OPTIONS FOR MAILER AND NOTIFICATIONS
  ##
  ###############################################################
  @mailer_class = nil
  @notification_class = nil
  @notification_response_class = nil

  @new_mailer_class = "Auth::SendMail"
  @mail_from = "bhargav.r.raut@gmail.com"
  
  ###############################################################
  ##
  ## OPTIONS FOR THE BACKGROUND JOB USED BY THE ENGINE.
  ##
  ###############################################################
  @queue_adapter = "shoryuken"

  ## command :
  ####################################################
  ##
  ##
  ## elasticsearch options.
  ##
  ###################################################
  @use_es = true


  ########################################################
  ##
  ## WORK ACCESSOR
  ##
  ########################################################
  @instruction_class = "Auth::Work::Instruction"
  @instruction_controller = "auth/work/instructions"

  @bullet_class = "Auth::Work::Bullet"
  @bullet_controller = "auth/work/bullets"
  ########################################################
  ##
  ##
  ## workflow accessors.
  ##
  ## are set to default to the engine classes.
  ## so if you don't set them, it doesn't matter.
  ##
  ########################################################
  @assembly_class = "Auth::Workflow::Assembly"
  @assembly_controller = "auth/workflow/assemblies"

  @stage_class = "Auth::Workflow::Stage"
  @stage_controller = "auth/workflow/stages"

  @sop_class = "Auth::Workflow::Sop"
  @sop_controller = "auth/workflow/sops"

  @step_class = "Auth::Workflow::Step"
  @step_controller = "auth/workflow/steps"
    
  @order_class = "Auth::Workflow::Order"
  @order_controller = "auth/workflow/orders"

  @requirement_class = "Auth::Workflow::Requirement"
  @requirement_controller = "auth/workflow/requirements"  

  @state_class = "Auth::Workflow::State"
  @state_controller = "auth/workflow/states"

  ## tlocation is not used anywhere, either the model or controller
  @tlocation_class = "Auth::Workflow::Tlocation"
  @tlocation_controller = "auth/workflow/tlocations"

  
  @location_class = "Auth::Workflow::Location"
  @location_controller = "auth/workflow/locations"

  @schedule_class = "Auth::Workflow::Schedule"
  @schedule_controller = "auth/workflow/schedules"

  @booking_class = "Auth::Workflow::Booking"
  @booking_controller = "auth/workflow/bookings"

  @slot_class = "Auth::Workflow::Slot"
  @slot_controller = "auth/workflow/slots"

  @overlap_class = "Auth::Workflow::Overlap"
  @overlap_controller = "auth/workflow/overlaps"

  @minute_class = "Auth::Workflow::Minute"
  @minute_controller = "auth/workflow/minutes"

  @category_class = "Auth::Workflow::Category"
  @category_controller = "auth/workflow/categories"

  @entity_class = "Auth::Workflow::Entity"
  @entity_controller = "auth/workflow/entities"

  @specification_class = "Auth::Workflow::Specification"
  @specification_controller = "auth/workflow/specifications"

  ## this is the
  @consumable_class = "Auth::Workflow::Consumable"
  @consumable_controller = "auth/workflow/consumables"
  ########################################################
  ##
  ##
  ##
  ## IMAGE CONCERN MODEL AND CONTROLLER CLASSES
  ##
  ##
  ##
  ########################################################
  @image_class = "Auth::Image"
  @image_controller = "auth/images"
  @protect_image_with_recaptcha = true

  ########################################################
  ##
  ## ROLLING MINUTES
  ##
  ########################################################
  @rolling_minutes = 30
  @currency = "INR"


  ########################################################
  ##
  ## ENDPOINT CLASS.
  ## for amazon and aws notifications.
  ##
  ########################################################
  @endpoint_class = "Auth::Endpoint"
  @endpoint_controller = "auth/endpoints"


  ########################################################
  ##
  ##
  ## WORK CLASSES
  ##
  ##
  ########################################################
  @communication_controller = "auth/work/communications"
  @communication_class = "Auth::Work::Communication"

  @cycle_controller = "auth/work/cycles"
  @cycle_class = "Auth::Work::Cycle"

  ########################################################
  ##
  ##
  ## THIRD PARTY ATTRIBUTES.
  ##
  ##
  ########################################################
  ## defaults.
  @two_factor_otp_transactional_sms_template_name = "test2"
  @two_factor_otp_transactional_sms_template_sender_id = "PATHOF"


  ########################################################
  ##
  ##
  ########################################################
  @hashids_salt = "i am a salt"
  @hashids_alphabet = "abcdefghijklmnopqrstuvwxyz123456789"


  ########################################################
  ##
  ## barcode : api enabled by default.
  ##
  ########################################################
  @enable_barcode_api = true


  ########################################################
  ##
  ##
  ## profile controller
  ##
  ##
  ########################################################
  @profiles_controller = "auth/profiles"


end