Commit 6f785d58 authored by Valery Sizov's avatar Valery Sizov

retrieving oauth token with LDAP credentials

parent abb5b9f6
...@@ -22,6 +22,7 @@ v 8.0.0 (unreleased) ...@@ -22,6 +22,7 @@ v 8.0.0 (unreleased)
- Fix 500 error when submit project snippet without body - Fix 500 error when submit project snippet without body
- Improve search page usability - Improve search page usability
- Bring more UI consistency in way how projects, snippets and groups lists are rendered - Bring more UI consistency in way how projects, snippets and groups lists are rendered
- Retrieving oauth token with LDAP credentials
v 7.14.1 v 7.14.1
- Improve abuse reports management from admin area - Improve abuse reports management from admin area
......
...@@ -12,8 +12,7 @@ Doorkeeper.configure do ...@@ -12,8 +12,7 @@ Doorkeeper.configure do
end end
resource_owner_from_credentials do |routes| resource_owner_from_credentials do |routes|
u = User.find_by(email: params[:username]) || User.find_by(username: params[:username]) Gitlab::Auth.new.find(params[:username], params[:password])
u if u && u.valid_password?(params[:password])
end end
# If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below. # If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment