wordjelly-auth 1.4.8 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/auth/profiles_controller.rb +1 -1
- data/config/initializers/omniauth.rb +14 -5
- data/lib/auth/version.rb +1 -1
- data/spec/dummy/app/assets/time_hashes.json +1 -1
- data/spec/dummy/log/test.log +83 -0
- data/spec/requests/user/registration_request_spec.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ca38b4329d89f90793673c6d64b4ce7dd3aba5e729358c2fd78062d2125857d
|
4
|
+
data.tar.gz: b96bcca2319d39b9053ac397c592427fd738b9229484ebab19b95253bd22ed59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ffe5cf4a8a233bb3665801428ed4261a82d1949633e854f723d9ab60dc7759ccd861f856cf771da7a0f9c3a9fbf6de8cfd9204a0b0632d763d03bc722a14ea
|
7
|
+
data.tar.gz: 76c0c19a7607b59100638c58149cfce7dba3f8b7b63678ec2823dd73ff0d29e706355f0bb7c8f76f4ebeb1eacbfe4578b621e1062784ef7baa0bc4f3a2d34dca
|
@@ -414,6 +414,12 @@ module SimpleTokenAuthentication
|
|
414
414
|
|
415
415
|
module ActsAsTokenAuthenticatable
|
416
416
|
|
417
|
+
## if the skip_authentication_token_generation carries
|
418
|
+
## any value it will not regenerate the authentication token.
|
419
|
+
## this can be useful if you are updating the user, but not his
|
420
|
+
##
|
421
|
+
mattr_accessor :skip_authentication_token_regeneration
|
422
|
+
|
417
423
|
def regenerate_token
|
418
424
|
self.authentication_token = generate_authentication_token(token_generator)
|
419
425
|
raise "please set a field called: encrypted_authentication_token on your user model" unless self.respond_to? :encrypted_authentication_token
|
@@ -422,8 +428,11 @@ module SimpleTokenAuthentication
|
|
422
428
|
end
|
423
429
|
|
424
430
|
## CHANGE THE AUTHENTICATION TOKEN WHENEVER THE USER IS SAVED. IT DOESNT MATTER IF THERE IS AN EXISTING AUTHENTICATION TOKEN OR NOT.
|
431
|
+
## so this is happening, we will have to skip this hook.
|
432
|
+
## so we will have to mod this to check for an accessor.
|
433
|
+
## otherwise it will screw up totally.
|
425
434
|
def ensure_authentication_token
|
426
|
-
regenerate_token
|
435
|
+
regenerate_token if self.skip_authentication_token_regeneration.blank?
|
427
436
|
end
|
428
437
|
end
|
429
438
|
|
@@ -437,7 +446,7 @@ module SimpleTokenAuthentication
|
|
437
446
|
## to prevent that from happening, we ignore the fallback if we are already signed in.
|
438
447
|
def fallback!(entity, fallback_handler)
|
439
448
|
|
440
|
-
|
449
|
+
# puts "came to fallback!"
|
441
450
|
|
442
451
|
return if self.signed_in?
|
443
452
|
|
@@ -478,17 +487,17 @@ module SimpleTokenAuthentication
|
|
478
487
|
|
479
488
|
def find_record_from_identifier(entity)
|
480
489
|
## you are supposed to find the record using one of the other parameters.
|
481
|
-
puts "came to find entity from identifier -----------------------------------"
|
490
|
+
#puts "came to find entity from identifier -----------------------------------"
|
482
491
|
additional_identifiers = entity.get_additional_identifiers_from_headers(self)
|
483
492
|
|
484
|
-
puts "additional_identifiers"
|
493
|
+
#puts "additional_identifiers"
|
485
494
|
puts additional_identifiers
|
486
495
|
|
487
496
|
app_id_value = additional_identifiers["X-User-Aid"]
|
488
497
|
user_es_value = additional_identifiers["X-User-Es"]
|
489
498
|
token = entity.get_token_from_params_or_headers(self)
|
490
499
|
|
491
|
-
puts "token:#{token}"
|
500
|
+
#puts "token:#{token}"
|
492
501
|
|
493
502
|
if token
|
494
503
|
|
data/lib/auth/version.rb
CHANGED