Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rails_api_authentication
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
rails_api_authentication
Commits
80df9ea7
Commit
80df9ea7
authored
Nov 05, 2018
by
liyijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add password_raw= method
parent
13247601
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
authable.rb
lib/rails_api_authentication/authable.rb
+4
-0
No files found.
lib/rails_api_authentication/authable.rb
View file @
80df9ea7
...
...
@@ -11,6 +11,10 @@ module RailsApiAuthentication
AuthToken
.
find
(
token:
token
)
&
.
first
&
.
delete
if
token
.
present?
end
def
password_raw
=
password
self
.
update_password
(
password
)
end
def
update_password
password
raise
(
UserError
.
new
(
400
,
'-1'
,
'password is blank'
))
if
password
.
blank?
auth_password
=
self
.
class
.
auth_password
...
...
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