Fix #52 rubocop metrics abc size in passwords controller (#119)

* Fix #52 rubocop metrics abc size in passwords controller

* Fix DeviseTokenAuth headers names
This commit is contained in:
AlexisChavez97
2019-10-22 02:02:06 -05:00
committed by Pranav Raj S
parent 10d3ab295c
commit 9c22da0ac6

View File

@@ -31,11 +31,12 @@ class PasswordsController < Devise::PasswordsController
def set_headers(user)
data = user.create_new_auth_token
response.headers[DeviseTokenAuth.headers_names[:"access-token"]] = data['access-token']
response.headers[DeviseTokenAuth.headers_names[:"token-type"]] = 'Bearer'
response.headers[DeviseTokenAuth.headers_names[:client]] = data['client']
response.headers[DeviseTokenAuth.headers_names[:expiry]] = data['expiry']
response.headers[DeviseTokenAuth.headers_names[:uid]] = data['uid']
headers_names = response.headers[DeviseTokenAuth.headers_names]
headers_names[:'access-token'] = data['access-token']
headers_names[:'token-type'] = 'Bearer'
headers_names[:'client'] = data['client']
headers_names[:'expiry'] = data['expiry']
headers_names[:'uid'] = data['uid']
end
def reset_password_and_confirmation(recoverable)