Class: Auth::Configuration
- Inherits:
-
Object
- Object
- Auth::Configuration
- Defined in:
- lib/auth/engine.rb
Instance Attribute Summary collapse
-
#assembly_class ⇒ Object
Returns the value of attribute assembly_class.
-
#assembly_controller ⇒ Object
Returns the value of attribute assembly_controller.
-
#auth_resources ⇒ Object
Returns the value of attribute auth_resources.
-
#booking_class ⇒ Object
Returns the value of attribute booking_class.
-
#booking_controller ⇒ Object
Returns the value of attribute booking_controller.
-
#brand_name ⇒ Object
Returns the value of attribute brand_name.
-
#cart_class ⇒ Object
Returns the value of attribute cart_class.
-
#cart_controller ⇒ Object
Returns the value of attribute cart_controller.
-
#cart_item_class ⇒ Object
Returns the value of attribute cart_item_class.
-
#cart_item_controller ⇒ Object
Returns the value of attribute cart_item_controller.
-
#category_class ⇒ Object
CURRENTLY USED ####.
-
#category_controller ⇒ Object
Returns the value of attribute category_controller.
-
#consumable_class ⇒ Object
workflow accessors.
-
#consumable_controller ⇒ Object
Returns the value of attribute consumable_controller.
-
#discount_class ⇒ Object
Returns the value of attribute discount_class.
-
#discount_controller ⇒ Object
Returns the value of attribute discount_controller.
-
#do_redirect ⇒ Object
Returns the value of attribute do_redirect.
-
#enable_sign_in_modals ⇒ Object
Returns the value of attribute enable_sign_in_modals.
-
#enable_token_auth ⇒ Object
Returns the value of attribute enable_token_auth.
-
#entity_class ⇒ Object
Returns the value of attribute entity_class.
-
#entity_controller ⇒ Object
Returns the value of attribute entity_controller.
-
#host_name ⇒ Object
used in lib/auth/omniauth.rb inside Google_OAuth2.class_eval.
-
#image_class ⇒ Object
image concern accessors.
-
#image_controller ⇒ Object
Returns the value of attribute image_controller.
-
#location_class ⇒ Object
CURRENTLY USED.
-
#location_controller ⇒ Object
Returns the value of attribute location_controller.
-
#mailer_class ⇒ Object
the class used in the user_concern, to send emails.
-
#minute_class ⇒ Object
Returns the value of attribute minute_class.
-
#minute_controller ⇒ Object
Returns the value of attribute minute_controller.
-
#mount_path ⇒ Object
Returns the value of attribute mount_path.
-
#navbar ⇒ Object
Returns the value of attribute navbar.
-
#notification_class ⇒ Object
Returns the value of attribute notification_class.
-
#notification_response_class ⇒ Object
Returns the value of attribute notification_response_class.
-
#oauth_credentials ⇒ Object
Returns the value of attribute oauth_credentials.
-
#order_class ⇒ Object
Returns the value of attribute order_class.
-
#order_controller ⇒ Object
Returns the value of attribute order_controller.
-
#otp_controller ⇒ Object
Returns the value of attribute otp_controller.
-
#overlap_class ⇒ Object
this is also no longer user.
-
#overlap_controller ⇒ Object
Returns the value of attribute overlap_controller.
-
#payment_class ⇒ Object
Returns the value of attribute payment_class.
-
#payment_controller ⇒ Object
Returns the value of attribute payment_controller.
-
#payment_gateway_info ⇒ Object
Returns the value of attribute payment_gateway_info.
-
#prevent_oauth_merger ⇒ Object
Returns the value of attribute prevent_oauth_merger.
-
#product_class ⇒ Object
Returns the value of attribute product_class.
-
#product_controller ⇒ Object
Returns the value of attribute product_controller.
-
#queue_adapter ⇒ Object
the queue adapter for the delayed jobs.
-
#recaptcha ⇒ Object
Returns the value of attribute recaptcha.
-
#redis_config_file_location ⇒ Object
Returns the value of attribute redis_config_file_location.
-
#requirement_class ⇒ Object
Returns the value of attribute requirement_class.
-
#requirement_controller ⇒ Object
Returns the value of attribute requirement_controller.
-
#rolling_minutes ⇒ Object
WORK CONSTANTS.
-
#schedule_class ⇒ Object
these three are not used.
-
#schedule_controller ⇒ Object
Returns the value of attribute schedule_controller.
-
#simulate_invalid_otp ⇒ Object
Returns the value of attribute simulate_invalid_otp.
-
#slot_class ⇒ Object
Returns the value of attribute slot_class.
-
#slot_controller ⇒ Object
Returns the value of attribute slot_controller.
-
#sop_class ⇒ Object
Returns the value of attribute sop_class.
-
#sop_controller ⇒ Object
Returns the value of attribute sop_controller.
-
#specification_class ⇒ Object
Returns the value of attribute specification_class.
-
#specification_controller ⇒ Object
Returns the value of attribute specification_controller.
-
#stage_class ⇒ Object
Returns the value of attribute stage_class.
-
#stage_controller ⇒ Object
Returns the value of attribute stage_controller.
-
#state_class ⇒ Object
Returns the value of attribute state_class.
-
#state_controller ⇒ Object
Returns the value of attribute state_controller.
-
#step_class ⇒ Object
Returns the value of attribute step_class.
-
#step_controller ⇒ Object
Returns the value of attribute step_controller.
-
#stub_otp_api_calls ⇒ Object
Returns the value of attribute stub_otp_api_calls.
-
#third_party_api_keys ⇒ Object
Returns the value of attribute third_party_api_keys.
-
#tlocation_class ⇒ Object
this tlocation thing is no longer used.
-
#tlocation_controller ⇒ Object
Returns the value of attribute tlocation_controller.
-
#token_regeneration_time ⇒ Object
Returns the value of attribute token_regeneration_time.
-
#use_es ⇒ Object
whether to use es or not.
-
#user_class ⇒ Object
Returns the value of attribute user_class.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/auth/engine.rb', line 198 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_class = nil @cart_controller = nil @cart_class = nil @payment_controller = nil @payment_class = nil @payment_gateway_info = {} @product_class = nil @product_controller = nil @discount_class = nil @discount_controller = nil ############################################################### ## ## OPTIONS FOR MAILER AND NOTIFICATIONS ## ############################################################### @mailer_class = nil @notification_class = nil @notification_response_class = nil ############################################################### ## ## OPTIONS FOR THE BACKGROUND JOB USED BY THE ENGINE. ## ############################################################### @queue_adapter = "shoryuken" #################################################### ## ## ## elasticsearch options. ## ################################################### @use_es = true ######################################################## ## ## ## 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" ######################################################## ## ## ROLLING MINUTES ## ######################################################## @rolling_minutes = 30 end |
Instance Attribute Details
#assembly_class ⇒ Object
Returns the value of attribute assembly_class.
114 115 116 |
# File 'lib/auth/engine.rb', line 114 def assembly_class @assembly_class end |
#assembly_controller ⇒ Object
Returns the value of attribute assembly_controller.
115 116 117 |
# File 'lib/auth/engine.rb', line 115 def assembly_controller @assembly_controller end |
#auth_resources ⇒ Object
Returns the value of attribute auth_resources.
58 59 60 |
# File 'lib/auth/engine.rb', line 58 def auth_resources @auth_resources end |
#booking_class ⇒ Object
Returns the value of attribute booking_class.
147 148 149 |
# File 'lib/auth/engine.rb', line 147 def booking_class @booking_class end |
#booking_controller ⇒ Object
Returns the value of attribute booking_controller.
148 149 150 |
# File 'lib/auth/engine.rb', line 148 def booking_controller @booking_controller end |
#brand_name ⇒ Object
Returns the value of attribute brand_name.
82 83 84 |
# File 'lib/auth/engine.rb', line 82 def brand_name @brand_name end |
#cart_class ⇒ Object
Returns the value of attribute cart_class.
70 71 72 |
# File 'lib/auth/engine.rb', line 70 def cart_class @cart_class end |
#cart_controller ⇒ Object
Returns the value of attribute cart_controller.
69 70 71 |
# File 'lib/auth/engine.rb', line 69 def cart_controller @cart_controller end |
#cart_item_class ⇒ Object
Returns the value of attribute cart_item_class.
68 69 70 |
# File 'lib/auth/engine.rb', line 68 def cart_item_class @cart_item_class end |
#cart_item_controller ⇒ Object
Returns the value of attribute cart_item_controller.
67 68 69 |
# File 'lib/auth/engine.rb', line 67 def cart_item_controller @cart_item_controller end |
#category_class ⇒ Object
CURRENTLY USED ####
163 164 165 |
# File 'lib/auth/engine.rb', line 163 def category_class @category_class end |
#category_controller ⇒ Object
Returns the value of attribute category_controller.
164 165 166 |
# File 'lib/auth/engine.rb', line 164 def category_controller @category_controller end |
#consumable_class ⇒ Object
workflow accessors.
111 112 113 |
# File 'lib/auth/engine.rb', line 111 def consumable_class @consumable_class end |
#consumable_controller ⇒ Object
Returns the value of attribute consumable_controller.
112 113 114 |
# File 'lib/auth/engine.rb', line 112 def consumable_controller @consumable_controller end |
#discount_class ⇒ Object
Returns the value of attribute discount_class.
74 75 76 |
# File 'lib/auth/engine.rb', line 74 def discount_class @discount_class end |
#discount_controller ⇒ Object
Returns the value of attribute discount_controller.
75 76 77 |
# File 'lib/auth/engine.rb', line 75 def discount_controller @discount_controller end |
#do_redirect ⇒ Object
Returns the value of attribute do_redirect.
81 82 83 |
# File 'lib/auth/engine.rb', line 81 def do_redirect @do_redirect end |
#enable_sign_in_modals ⇒ Object
Returns the value of attribute enable_sign_in_modals.
59 60 61 |
# File 'lib/auth/engine.rb', line 59 def enable_sign_in_modals @enable_sign_in_modals end |
#enable_token_auth ⇒ Object
Returns the value of attribute enable_token_auth.
55 56 57 |
# File 'lib/auth/engine.rb', line 55 def enable_token_auth @enable_token_auth end |
#entity_class ⇒ Object
Returns the value of attribute entity_class.
169 170 171 |
# File 'lib/auth/engine.rb', line 169 def entity_class @entity_class end |
#entity_controller ⇒ Object
Returns the value of attribute entity_controller.
170 171 172 |
# File 'lib/auth/engine.rb', line 170 def entity_controller @entity_controller end |
#host_name ⇒ Object
used in lib/auth/omniauth.rb inside Google_OAuth2.class_eval
97 98 99 |
# File 'lib/auth/engine.rb', line 97 def host_name @host_name end |
#image_class ⇒ Object
image concern accessors
183 184 185 |
# File 'lib/auth/engine.rb', line 183 def image_class @image_class end |
#image_controller ⇒ Object
Returns the value of attribute image_controller.
184 185 186 |
# File 'lib/auth/engine.rb', line 184 def image_controller @image_controller end |
#location_class ⇒ Object
CURRENTLY USED
140 141 142 |
# File 'lib/auth/engine.rb', line 140 def location_class @location_class end |
#location_controller ⇒ Object
Returns the value of attribute location_controller.
141 142 143 |
# File 'lib/auth/engine.rb', line 141 def location_controller @location_controller end |
#mailer_class ⇒ Object
the class used in the user_concern, to send emails. should inherit from Auth::Notifier. the class used to send the notification
87 88 89 |
# File 'lib/auth/engine.rb', line 87 def mailer_class @mailer_class end |
#minute_class ⇒ Object
Returns the value of attribute minute_class.
166 167 168 |
# File 'lib/auth/engine.rb', line 166 def minute_class @minute_class end |
#minute_controller ⇒ Object
Returns the value of attribute minute_controller.
167 168 169 |
# File 'lib/auth/engine.rb', line 167 def minute_controller @minute_controller end |
#mount_path ⇒ Object
Returns the value of attribute mount_path.
57 58 59 |
# File 'lib/auth/engine.rb', line 57 def mount_path @mount_path end |
#navbar ⇒ Object
Returns the value of attribute navbar.
93 94 95 |
# File 'lib/auth/engine.rb', line 93 def @navbar end |
#notification_class ⇒ Object
Returns the value of attribute notification_class.
76 77 78 |
# File 'lib/auth/engine.rb', line 76 def notification_class @notification_class end |
#notification_response_class ⇒ Object
Returns the value of attribute notification_response_class.
83 84 85 |
# File 'lib/auth/engine.rb', line 83 def notification_response_class @notification_response_class end |
#oauth_credentials ⇒ Object
Returns the value of attribute oauth_credentials.
56 57 58 |
# File 'lib/auth/engine.rb', line 56 def oauth_credentials @oauth_credentials end |
#order_class ⇒ Object
Returns the value of attribute order_class.
126 127 128 |
# File 'lib/auth/engine.rb', line 126 def order_class @order_class end |
#order_controller ⇒ Object
Returns the value of attribute order_controller.
127 128 129 |
# File 'lib/auth/engine.rb', line 127 def order_controller @order_controller end |
#otp_controller ⇒ Object
Returns the value of attribute otp_controller.
66 67 68 |
# File 'lib/auth/engine.rb', line 66 def otp_controller @otp_controller end |
#overlap_class ⇒ Object
this is also no longer user.
155 156 157 |
# File 'lib/auth/engine.rb', line 155 def overlap_class @overlap_class end |
#overlap_controller ⇒ Object
Returns the value of attribute overlap_controller.
156 157 158 |
# File 'lib/auth/engine.rb', line 156 def overlap_controller @overlap_controller end |
#payment_class ⇒ Object
Returns the value of attribute payment_class.
73 74 75 |
# File 'lib/auth/engine.rb', line 73 def payment_class @payment_class end |
#payment_controller ⇒ Object
Returns the value of attribute payment_controller.
77 78 79 |
# File 'lib/auth/engine.rb', line 77 def payment_controller @payment_controller end |
#payment_gateway_info ⇒ Object
Returns the value of attribute payment_gateway_info.
78 79 80 |
# File 'lib/auth/engine.rb', line 78 def payment_gateway_info @payment_gateway_info end |
#prevent_oauth_merger ⇒ Object
Returns the value of attribute prevent_oauth_merger.
60 61 62 |
# File 'lib/auth/engine.rb', line 60 def prevent_oauth_merger @prevent_oauth_merger end |
#product_class ⇒ Object
Returns the value of attribute product_class.
71 72 73 |
# File 'lib/auth/engine.rb', line 71 def product_class @product_class end |
#product_controller ⇒ Object
Returns the value of attribute product_controller.
72 73 74 |
# File 'lib/auth/engine.rb', line 72 def product_controller @product_controller end |
#queue_adapter ⇒ Object
the queue adapter for the delayed jobs
91 92 93 |
# File 'lib/auth/engine.rb', line 91 def queue_adapter @queue_adapter end |
#recaptcha ⇒ Object
Returns the value of attribute recaptcha.
61 62 63 |
# File 'lib/auth/engine.rb', line 61 def recaptcha @recaptcha end |
#redis_config_file_location ⇒ Object
Returns the value of attribute redis_config_file_location.
62 63 64 |
# File 'lib/auth/engine.rb', line 62 def redis_config_file_location @redis_config_file_location end |
#requirement_class ⇒ Object
Returns the value of attribute requirement_class.
129 130 131 |
# File 'lib/auth/engine.rb', line 129 def requirement_class @requirement_class end |
#requirement_controller ⇒ Object
Returns the value of attribute requirement_controller.
130 131 132 |
# File 'lib/auth/engine.rb', line 130 def requirement_controller @requirement_controller end |
#rolling_minutes ⇒ Object
WORK CONSTANTS.
196 197 198 |
# File 'lib/auth/engine.rb', line 196 def rolling_minutes @rolling_minutes end |
#schedule_class ⇒ Object
these three are not used.
144 145 146 |
# File 'lib/auth/engine.rb', line 144 def schedule_class @schedule_class end |
#schedule_controller ⇒ Object
Returns the value of attribute schedule_controller.
145 146 147 |
# File 'lib/auth/engine.rb', line 145 def schedule_controller @schedule_controller end |
#simulate_invalid_otp ⇒ Object
Returns the value of attribute simulate_invalid_otp.
65 66 67 |
# File 'lib/auth/engine.rb', line 65 def simulate_invalid_otp @simulate_invalid_otp end |
#slot_class ⇒ Object
Returns the value of attribute slot_class.
150 151 152 |
# File 'lib/auth/engine.rb', line 150 def slot_class @slot_class end |
#slot_controller ⇒ Object
Returns the value of attribute slot_controller.
151 152 153 |
# File 'lib/auth/engine.rb', line 151 def slot_controller @slot_controller end |
#sop_class ⇒ Object
Returns the value of attribute sop_class.
120 121 122 |
# File 'lib/auth/engine.rb', line 120 def sop_class @sop_class end |
#sop_controller ⇒ Object
Returns the value of attribute sop_controller.
121 122 123 |
# File 'lib/auth/engine.rb', line 121 def sop_controller @sop_controller end |
#specification_class ⇒ Object
Returns the value of attribute specification_class.
172 173 174 |
# File 'lib/auth/engine.rb', line 172 def specification_class @specification_class end |
#specification_controller ⇒ Object
Returns the value of attribute specification_controller.
173 174 175 |
# File 'lib/auth/engine.rb', line 173 def specification_controller @specification_controller end |
#stage_class ⇒ Object
Returns the value of attribute stage_class.
117 118 119 |
# File 'lib/auth/engine.rb', line 117 def stage_class @stage_class end |
#stage_controller ⇒ Object
Returns the value of attribute stage_controller.
118 119 120 |
# File 'lib/auth/engine.rb', line 118 def stage_controller @stage_controller end |
#state_class ⇒ Object
Returns the value of attribute state_class.
132 133 134 |
# File 'lib/auth/engine.rb', line 132 def state_class @state_class end |
#state_controller ⇒ Object
Returns the value of attribute state_controller.
133 134 135 |
# File 'lib/auth/engine.rb', line 133 def state_controller @state_controller end |
#step_class ⇒ Object
Returns the value of attribute step_class.
123 124 125 |
# File 'lib/auth/engine.rb', line 123 def step_class @step_class end |
#step_controller ⇒ Object
Returns the value of attribute step_controller.
124 125 126 |
# File 'lib/auth/engine.rb', line 124 def step_controller @step_controller end |
#stub_otp_api_calls ⇒ Object
Returns the value of attribute stub_otp_api_calls.
64 65 66 |
# File 'lib/auth/engine.rb', line 64 def stub_otp_api_calls @stub_otp_api_calls end |
#third_party_api_keys ⇒ Object
Returns the value of attribute third_party_api_keys.
63 64 65 |
# File 'lib/auth/engine.rb', line 63 def third_party_api_keys @third_party_api_keys end |
#tlocation_class ⇒ Object
this tlocation thing is no longer used.
136 137 138 |
# File 'lib/auth/engine.rb', line 136 def tlocation_class @tlocation_class end |
#tlocation_controller ⇒ Object
Returns the value of attribute tlocation_controller.
137 138 139 |
# File 'lib/auth/engine.rb', line 137 def tlocation_controller @tlocation_controller end |
#token_regeneration_time ⇒ Object
Returns the value of attribute token_regeneration_time.
79 80 81 |
# File 'lib/auth/engine.rb', line 79 def token_regeneration_time @token_regeneration_time end |
#use_es ⇒ Object
whether to use es or not.
101 102 103 |
# File 'lib/auth/engine.rb', line 101 def use_es @use_es end |
#user_class ⇒ Object
Returns the value of attribute user_class.
80 81 82 |
# File 'lib/auth/engine.rb', line 80 def user_class @user_class end |