diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-26 15:27:01 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-26 15:27:01 +0300 |
commit | e82b70eb530293c3dfe8597c4100320fba96e479 (patch) | |
tree | a51bf70d9582e444c480e8449c337815864668c1 /lib/pleroma/web/oauth/oauth_controller.ex | |
parent | afddce45b3d4d9ea61620c941838a372ca225825 (diff) | |
download | pleroma-e82b70eb530293c3dfe8597c4100320fba96e479.tar.gz |
Database authenticator behaviour / Pleroma implementation refactoring.
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r-- | lib/pleroma/web/oauth/oauth_controller.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index abe6fd2f2..02c0babd2 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -5,7 +5,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do use Pleroma.Web, :controller - alias Pleroma.Web.OAuth + alias Pleroma.Web.Auth.DatabaseAuthenticator alias Pleroma.Web.OAuth.Authorization alias Pleroma.Web.OAuth.Token alias Pleroma.Web.OAuth.App @@ -45,7 +45,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do "redirect_uri" => redirect_uri } = auth_params }) do - with {_, {:ok, %User{} = user}} <- {:get_user, OAuth.authenticator().get_user(conn)}, + with {_, {:ok, %User{} = user}} <- {:get_user, DatabaseAuthenticator.get_user(conn)}, %App{} = app <- Repo.get_by(App, client_id: client_id), true <- redirect_uri in String.split(app.redirect_uris), scopes <- oauth_scopes(auth_params, []), @@ -98,7 +98,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do |> authorize(auth_params) error -> - OAuth.authenticator().handle_error(conn, error) + DatabaseAuthenticator.handle_error(conn, error) end end |