Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
10ea7539
Commit
10ea7539
authored
Nov 14, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove token_field_name method from base class
parent
444062d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
app/models/concerns/token_authenticatable_strategies/base.rb
app/models/concerns/token_authenticatable_strategies/base.rb
+0
-4
app/models/concerns/token_authenticatable_strategies/encrypted.rb
...ls/concerns/token_authenticatable_strategies/encrypted.rb
+3
-3
No files found.
app/models/concerns/token_authenticatable_strategies/base.rb
View file @
10ea7539
...
@@ -65,9 +65,5 @@ module TokenAuthenticatableStrategies
...
@@ -65,9 +65,5 @@ module TokenAuthenticatableStrategies
def
token_set?
(
instance
)
def
token_set?
(
instance
)
raise
NotImplementedError
raise
NotImplementedError
end
end
def
token_field_name
@token_field
end
end
end
end
end
app/models/concerns/token_authenticatable_strategies/encrypted.rb
View file @
10ea7539
...
@@ -38,10 +38,10 @@ module TokenAuthenticatableStrategies
...
@@ -38,10 +38,10 @@ module TokenAuthenticatableStrategies
end
end
def
token_set?
(
instance
)
def
token_set?
(
instance
)
token_digest
=
instance
.
read_attribute
(
token_field_name
)
raw_token
=
instance
.
read_attribute
(
token_field_name
)
token_digest
||=
instance
.
read_attribute
(
@token_field
)
if
@options
[
:fallback
]
raw_token
||=
instance
.
read_attribute
(
@token_field
)
if
@options
[
:fallback
]
token_digest
.
present?
raw_token
.
present?
end
end
def
token_field_name
def
token_field_name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment