Improving feed queries, switching API to doorkeeper authentication
This commit is contained in:
parent
b919f39b31
commit
447cfef62d
12 changed files with 50 additions and 11 deletions
|
@ -7,6 +7,12 @@ Doorkeeper.configure do
|
|||
current_user || redirect_to(new_user_session_url)
|
||||
end
|
||||
|
||||
resource_owner_from_credentials do |routes|
|
||||
request.params[:user] = { email: request.params[:username], password: request.params[:password] }
|
||||
request.env["devise.allow_params_authentication"] = true
|
||||
request.env["warden"].authenticate!(scope: :user)
|
||||
end
|
||||
|
||||
# If you want to restrict access to the web interface for adding oauth authorized applications, you need to declare the block below.
|
||||
# admin_authenticator do
|
||||
# # Put your admin authentication logic here.
|
||||
|
@ -90,7 +96,8 @@ Doorkeeper.configure do
|
|||
# http://tools.ietf.org/html/rfc6819#section-4.4.2
|
||||
# http://tools.ietf.org/html/rfc6819#section-4.4.3
|
||||
#
|
||||
# grant_flows %w(authorization_code client_credentials)
|
||||
|
||||
grant_flows %w(authorization_code password client_credentials)
|
||||
|
||||
# Under some circumstances you might want to have applications auto-approved,
|
||||
# so that the user skips the authorization step.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue