summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-14 14:40:37 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-14 14:40:37 +0100
commit10ea75396b8fe22e4b2fd1514e5d07e7bd97bf08 (patch)
tree3e3aa04bbdb50aae8bdb9177eae1060092982802 /app/models
parent444062d9ee09fdcee03ef0f41611f355febb1158 (diff)
downloadgitlab-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.rb4
-rw-r--r--app/models/concerns/token_authenticatable_strategies/encrypted.rb6
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