Skip to content

Commit

Permalink
Fix for issue lynndylanhurley#600
Browse files Browse the repository at this point in the history
Method set_user_by_token is called(from current_user) after
SessionController create action and @client_id was set to nil.
  • Loading branch information
Miika Leppänen committed Jul 8, 2016
1 parent 572e9b1 commit 668dbaa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def set_user_by_token(mapping=nil)

# parse header for values necessary for authentication
uid = request.headers[uid_name] || params[uid_name]
@token = request.headers[access_token_name] || params[access_token_name]
@client_id = request.headers[client_name] || params[client_name]
@token ||= request.headers[access_token_name] || params[access_token_name]
@client_id ||= request.headers[client_name] || params[client_name]

# client_id isn't required, set to 'default' if absent
@client_id ||= 'default'
Expand Down

0 comments on commit 668dbaa

Please sign in to comment.