diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-11-14 14:40:37 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-11-14 14:40:37 +0100 |
commit | 10ea75396b8fe22e4b2fd1514e5d07e7bd97bf08 (patch) | |
tree | 3e3aa04bbdb50aae8bdb9177eae1060092982802 /app/models | |
parent | 444062d9ee09fdcee03ef0f41611f355febb1158 (diff) | |
download | gitlab-ce-10ea75396b8fe22e4b2fd1514e5d07e7bd97bf08.tar.gz |
Remove token_field_name method from base class
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/token_authenticatable_strategies/base.rb | 4 | ||||
-rw-r--r-- | app/models/concerns/token_authenticatable_strategies/encrypted.rb | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/app/models/concerns/token_authenticatable_strategies/base.rb b/app/models/concerns/token_authenticatable_strategies/base.rb index 413721d3e6c..9aa04ba3d62 100644 --- a/app/models/concerns/token_authenticatable_strategies/base.rb +++ b/app/models/concerns/token_authenticatable_strategies/base.rb @@ -65,9 +65,5 @@ module TokenAuthenticatableStrategies def token_set?(instance) raise NotImplementedError end - - def token_field_name - @token_field - end end end diff --git a/app/models/concerns/token_authenticatable_strategies/encrypted.rb b/app/models/concerns/token_authenticatable_strategies/encrypted.rb index 985631119ba..c68ac399594 100644 --- a/app/models/concerns/token_authenticatable_strategies/encrypted.rb +++ b/app/models/concerns/token_authenticatable_strategies/encrypted.rb @@ -38,10 +38,10 @@ module TokenAuthenticatableStrategies end def token_set?(instance) - token_digest = instance.read_attribute(token_field_name) - token_digest ||= instance.read_attribute(@token_field) if @options[:fallback] + raw_token = instance.read_attribute(token_field_name) + raw_token ||= instance.read_attribute(@token_field) if @options[:fallback] - token_digest.present? + raw_token.present? end def token_field_name |