Skip to content
Snippets Groups Projects
Commit e7608cd6 authored by Valeriy Sizov's avatar Valeriy Sizov
Browse files

API: private token via header

parent 2e1c3c52
No related branches found
No related tags found
No related merge requests found
module Gitlab
module APIHelpers
def current_user
@current_user ||= User.find_by_authentication_token(params[:private_token] || header["private_token"])
@current_user ||= User.find_by_authentication_token(params[:private_token] || env["HTTP_PRIVATE_TOKEN"])
end
 
def user_project
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment